PHP Class Frontend\Core\Engine\Breadcrumb

Inheritance: extends Frontend\Core\Engine\Base\Object
Datei anzeigen Open project: forkcms/forkcms Class Usage Examples

Public Methods

Method 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 method

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

addElement() public method

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 method

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 method

Count number of breadcrumbs that are already added.
public count ( ) : integer
return integer

getItems() public method

Get all elements
public getItems ( ) : array
return array

parse() public method

Parse the breadcrumb into the template
public parse ( )