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();
ファイルを表示
Open project: php-fusion/PHP-Fusion
Class Usage Examples
Public Methods
Method
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
Add a link to the breadcrumb
public addBreadCrumb ( array $link ) : static
$link
array
Keys: link, title
return
static
public addCssClasses ( string $classes ) : static
$classes
string
return
static
Get an instance by key
public static getInstance ( string $key = 'default' ) : static
$key
string
return
static
public setCssClasses ( string $classes ) : static
$classes
string
return
static
public setLastClickable ( boolean $clickable = TRUE ) : static
$clickable
boolean
return
static
Show or hide the link to home page