PHP Класс Frontend\Core\Engine\Navigation

Наследование: extends Frontend\Core\Engine\Base\Object
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( Symfony\Component\HttpKernel\KernelInterface $kernel )
getBackendURLForBlock ( string $action, string $module, string $language = null, array $parameters = null, boolean $urlencode = true ) : string Creates a Backend URL for a given action and module If you don't specify a language the current language will be used.
getFirstChildId ( integer $pageId ) : integer Get the first child for a given parent
getFooterLinks ( ) : array Get all footer links
getKeys ( string $language = null ) : array Get the page-keys
getNavigation ( string $language = null ) : array Get the navigation-items
getNavigationHTML ( string $type = 'page', integer $parentId, integer $depth = null, array $excludeIds = [], string $template = '/Core/Layout/Templates/Navigation.html.twig', integer $depthCounter = 1 ) : string Get navigation HTML
getPageId ( string $url, string $language = null ) : integer Get a menuId for an specified URL
getPageInfo ( integer $pageId ) : string Get more info about a page
getURL ( integer $pageId, string $language = null ) : string Get URL for a given pageId
getURLForBlock ( string $module, string $action = null, string $language = null, array $data = null ) : string Get the URL for a give module & action combination
getURLForExtraId ( integer $id, string $language = null ) : string Fetch the first direct link to an extra id
setExcludedPageIds ( mixed $pageIds ) This function lets you add ignored pages
setSelectedPageIds ( ) Set the selected page ids

Описание методов

__construct() публичный Метод

public __construct ( Symfony\Component\HttpKernel\KernelInterface $kernel )
$kernel Symfony\Component\HttpKernel\KernelInterface

getBackendURLForBlock() публичный статический Метод

Creates a Backend URL for a given action and module If you don't specify a language the current language will be used.
public static getBackendURLForBlock ( string $action, string $module, string $language = null, array $parameters = null, boolean $urlencode = true ) : string
$action string The action to build the URL for.
$module string The module to build the URL for.
$language string The language to use, if not provided we will use the working language.
$parameters array GET-parameters to use.
$urlencode boolean Should the parameters be urlencoded?
Результат string

getFirstChildId() публичный статический Метод

Get the first child for a given parent
public static getFirstChildId ( integer $pageId ) : integer
$pageId integer The pageID wherefore we should retrieve the first child.
Результат integer

getKeys() публичный статический Метод

Get the page-keys
public static getKeys ( string $language = null ) : array
$language string The language wherefore the navigation should be loaded, if not provided we will load the language that was provided in the URL.
Результат array

getNavigation() публичный статический Метод

Get the navigation-items
public static getNavigation ( string $language = null ) : array
$language string The language wherefore the keys should be loaded, if not provided we will load the language that was provided in the URL.
Результат array

getNavigationHTML() публичный статический Метод

Get navigation HTML
public static getNavigationHTML ( string $type = 'page', integer $parentId, integer $depth = null, array $excludeIds = [], string $template = '/Core/Layout/Templates/Navigation.html.twig', integer $depthCounter = 1 ) : string
$type string The type of navigation the HTML should be build for.
$parentId integer The parentID to start of.
$depth integer The maximum depth to parse.
$excludeIds array PageIDs to be excluded.
$template string The template that will be used.
$depthCounter integer A counter that will hold the current depth.
Результат string

getPageId() публичный статический Метод

Get a menuId for an specified URL
public static getPageId ( string $url, string $language = null ) : integer
$url string The URL wherefore you want a pageID.
$language string The language wherefore the pageID should be retrieved, if not provided we will load the language that was provided in the URL.
Результат integer

getPageInfo() публичный статический Метод

Get more info about a page
public static getPageInfo ( integer $pageId ) : string
$pageId integer The pageID wherefore you want more information.
Результат string

getURL() публичный статический Метод

Get URL for a given pageId
public static getURL ( integer $pageId, string $language = null ) : string
$pageId integer The pageID wherefore you want the URL.
$language string The language wherein the URL should be retrieved, if not provided we will load the language that was provided in the URL.
Результат string

getURLForBlock() публичный статический Метод

Get the URL for a give module & action combination
public static getURLForBlock ( string $module, string $action = null, string $language = null, array $data = null ) : string
$module string The module wherefore the URL should be build.
$action string The specific action wherefore the URL should be build.
$language string The language wherein the URL should be retrieved, if not provided we will load the language that was provided in the URL.
$data array An array with keys and values that partially or fully match the data of the block. If it matches multiple versions of that block it will just return the first match.
Результат string

getURLForExtraId() публичный статический Метод

Fetch the first direct link to an extra id
public static getURLForExtraId ( integer $id, string $language = null ) : string
$id integer The id of the extra.
$language string The language wherein the URL should be retrieved, if not provided we will load the language that was provided in the URL.
Результат string

setExcludedPageIds() публичный статический Метод

This function lets you add ignored pages
public static setExcludedPageIds ( mixed $pageIds )
$pageIds mixed This can be a single page id or this can be an array with page ids.

setSelectedPageIds() публичный Метод

Set the selected page ids
public setSelectedPageIds ( )