PHP Class PHPFusion\BreadCrumbs

Get instances by keys:

Hide the home of $bcCustom hideHome();

Set the last breadcrumb clickable (it is rendered as a simple text by default) setLastClicklable();

You can override the default CSS classes of the wrapper HTML node $bcCustom->setCssClasses('breadcrumb-custom');

Be careful! If you want to add a new class, use this method addCssClasses('additional-class1 additional-class2');

Get the items as associative arrays toArray(); $itemsCustom = $bcCustom->toArray();

Afficher le fichier Open project: php-fusion/PHP-Fusion Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( )
addBreadCrumb ( array $link ) : static Add a link to the breadcrumb
addCssClasses ( string $classes ) : static
getCssClasses ( ) : string
getInstance ( string $key = 'default' ) : static Get an instance by key
hideHome ( ) : static Hide the link to home page
isHomeShown ( ) : boolean
isLastClickable ( ) : boolean
setCssClasses ( string $classes ) : static
setLastClickable ( boolean $clickable = TRUE ) : static
showHome ( boolean $state = TRUE ) : static Show or hide the link to home page
toArray ( ) : array Get breadcrumbs

Method Details

__construct() public méthode

public __construct ( )

addBreadCrumb() public méthode

Add a link to the breadcrumb
public addBreadCrumb ( array $link ) : static
$link array Keys: link, title
Résultat static

addCssClasses() public méthode

public addCssClasses ( string $classes ) : static
$classes string
Résultat static

getCssClasses() public méthode

public getCssClasses ( ) : string
Résultat string

getInstance() public static méthode

Get an instance by key
public static getInstance ( string $key = 'default' ) : static
$key string
Résultat static

hideHome() public méthode

Hide the link to home page
public hideHome ( ) : static
Résultat static

isHomeShown() public méthode

public isHomeShown ( ) : boolean
Résultat boolean

isLastClickable() public méthode

public isLastClickable ( ) : boolean
Résultat boolean

setCssClasses() public méthode

public setCssClasses ( string $classes ) : static
$classes string
Résultat static

setLastClickable() public méthode

public setLastClickable ( boolean $clickable = TRUE ) : static
$clickable boolean
Résultat static

showHome() public méthode

Show or hide the link to home page
public showHome ( boolean $state = TRUE ) : static
$state boolean
Résultat static

toArray() public méthode

Get breadcrumbs
public toArray ( ) : array
Résultat array Keys of elements: title, link