Sulu\Bundle\AdminBundle\Navigation\ContentNavigationRegistryInterface::getNavigationItems PHP Method

getNavigationItems() public method

Returns all the navigation items for the given alias.
public getNavigationItems ( string $alias, array $options = [] ) : ContentNavigationItem[]
$alias string The alias which specifies the returned group
$options array An arbitrary list of options to pass to the navigation items
return ContentNavigationItem[]
    public function getNavigationItems($alias, array $options = []);

Usage Example

 public function testCGetActionWithUnexistingAlias()
 {
     $query = ['alias' => 'not_existent_alias'];
     $request = new Request($query);
     $contentNavigationAliasNotFoundException = new ContentNavigationAliasNotFoundException($query['alias'], []);
     $this->contentNavigationCollector->getNavigationItems(Argument::cetera())->willThrow($contentNavigationAliasNotFoundException);
     $exception = new RestException($contentNavigationAliasNotFoundException->getMessage(), 0, $contentNavigationAliasNotFoundException);
     $this->viewHandler->handle(View::create($exception->toArray(), 404))->shouldBeCalled();
     $this->contentNavigationController->cgetAction($request);
 }
All Usage Examples Of Sulu\Bundle\AdminBundle\Navigation\ContentNavigationRegistryInterface::getNavigationItems
ContentNavigationRegistryInterface