protected function getStopElement($current): Model
    {
        $stopElement = $this->repository->findOneBy(
            ['tl_content.type=?', 'tl_content.bs_tab_parent=?'],
            ['bs_tab_end', $current->id]
        );

        if ($stopElement) {
            return $stopElement;
        }

        $nextElements = $this->getNextElements($current);
        $stopElement  = $this->createStopElement($current, (int) $current->sorting);
        $this->updateSortings($nextElements, (int) $stopElement->sorting);

        return $stopElement;
    }
protected function getStopElement($current): Model
    {
        $stopElement = $this->repository->findOneBy(
            ['tl_content.type=?', 'tl_content.bs_tab_parent=?'],
            ['bs_tab_end', $current->id]
        );

        if ($stopElement) {
            return $stopElement;
        }

        $nextElements = $this->getNextElements($current);
        $stopElement  = $this->createStopElement($current, (int) $current->sorting);
        $this->updateSortings($nextElements, (int) $stopElement->sorting);

        return $stopElement;
    }
protected function getStopElement ( $ current ) : Model { $ stopElement = $ this -> repository -> findOneBy ( [ 'tl_content.type=?' , 'tl_content.bs_tab_parent=?' ] , [ 'bs_tab_end' , $ current -> id ] ) ; if ( $ stopElement ) { return $ stopElement ; } $ nextElements = $ this -> getNextElements ( $ current ) ; $ stopElement = $ this -> createStopElement ( $ current , ( int ) $ current -> sorting ) ; $ this -> updateSortings ( $ nextElements , ( int ) $ stopElement -> sorting ) ; return $ stopElement ; }
Get related stop element.

@param ContentModel $current Current element.

@return ContentModel|Model
Get related stop element .