src/Mmi/Navigation/NavigationConfig.php
public function findById($id, $withParents = false)
    {
        $parents = [];
        foreach ($this->build() as $element) {
            if (null !== ($found = $this->_findInChildren($element, $id, $withParents, $parents))) {
                if ($withParents) {
                    $found['parents'] = array_reverse($parents);
                }
                return $found;
            }
        }
    }
public function findById($id, $withParents = false)
    {
        $parents = [];
        foreach ($this->build() as $element) {
            if (null !== ($found = $this->_findInChildren($element, $id, $withParents, $parents))) {
                if ($withParents) {
                    $found['parents'] = array_reverse($parents);
                }
                return $found;
            }
        }
    }
public function findById ( $ id , $ withParents = false ) { $ parents = [ ] ; foreach ( $ this -> build ( ) as $ element ) { if ( null !== ( $ found = $ this -> _findInChildren ( $ element , $ id , $ withParents , $ parents ) ) ) { if ( $ withParents ) { $ found [ 'parents' ] = array_reverse ( $ parents ) ; } return $ found ; } } }
Znajduje element po identyfikatorze
@param int $id identyfikator
@return \Mmi\Navigation\NavigationConfigElement
Znajduje element po identyfikatorze