public function getIterator(string $elementId): NavigationIterator
    {
        if (!isset($this->iterators[$elementId])) {
            $this->iterators[$elementId] = new NavigationIterator($this->getNavigation($elementId));
        }

        return $this->iterators[$elementId];
    }
public function getIterator(string $elementId): NavigationIterator
    {
        if (!isset($this->iterators[$elementId])) {
            $this->iterators[$elementId] = new NavigationIterator($this->getNavigation($elementId));
        }

        return $this->iterators[$elementId];
    }
public function getIterator ( string $ elementId ) : NavigationIterator { if ( ! isset ( $ this -> iterators [ $ elementId ] ) ) { $ this -> iterators [ $ elementId ] = new NavigationIterator ( $ this -> getNavigation ( $ elementId ) ) ; } return $ this -> iterators [ $ elementId ] ; }
Get the iterator.

@param string $elementId The element id.

@return NavigationIterator

@throws \Assert\AssertionFailedException When an invalid element is given.
Get the iterator .