PHP Class Frontend\Core\Engine\Breadcrumb

Inheritance: extends Frontend\Core\Engine\Base\Object
Afficher le fichier Open project: forkcms/forkcms Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( Symfony\Component\HttpKernel\KernelInterface $kernel )
addElement ( string $title, string $url = null ) Add an element
clear ( integer $key = null ) Clear all (or a specific) elements in the breadcrumb
count ( ) : integer Count number of breadcrumbs that are already added.
getItems ( ) : array Get all elements
parse ( ) Parse the breadcrumb into the template

Method Details

__construct() public méthode

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

addElement() public méthode

Add an element
public addElement ( string $title, string $url = null )
$title string The label that will be used in the breadcrumb.
$url string The URL for this item.

clear() public méthode

Clear all (or a specific) elements in the breadcrumb
public clear ( integer $key = null )
$key integer If the key is provided it will be removed from the array, otherwise the whole array will be cleared.

count() public méthode

Count number of breadcrumbs that are already added.
public count ( ) : integer
Résultat integer

getItems() public méthode

Get all elements
public getItems ( ) : array
Résultat array

parse() public méthode

Parse the breadcrumb into the template
public parse ( )