프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$breadcrumbs | array | The array which will store all of our breadcrumbs. | |
$breadcrumbsCssClasses | array | Classes applied to the main
|
|
$divider | string | The divider symbol between the breadcrumbs. Uses a slash as a default, since that's the Twitter Bootstrap style. | |
$listElement | The DOM-element that wraps the breadcrumbs. Set to ul by default. |
메소드 | 설명 | |
---|---|---|
__construct ( array $breadcrumbs = [], array $cssClasses = [] ) | The class constructor. Accepts an optional array of breadcrumbs, and an optional array of CSS classes to be applied to the container element. | |
__toString ( ) : string | __toString magic method. | |
add ( string $name = '', string $href = '', boolean $hrefIsFullUrl = false ) | Adds a crumb to the internal array. | |
addCrumb ( string $name = '', string $href = '', boolean $hrefIsFullUrl = false ) | Adds a crumb to the internal array. | |
addCssClasses ( $cssClasses ) |
Adds more CSS classes which will be applied to the containing
|
|
count ( ) : integer | Gets the current amount of breadcrumbs | |
getBreadcrumbs ( ) : array | Gets the currently configured breadcrumbs. | |
getBreadcrumbsCssClasses ( ) : array | Gets the currently configured breadcrumbs CSS classes. | |
getDivider ( ) : string | Gets the divider currently in use. | |
isEmpty ( ) : boolean | Checks whether there are any breadcrumbs added yet. | |
isValidCrumb ( array $crumb ) : boolean | Checks whether a crumb is valid, so that it can safely be added to the internal breadcrumbs array. | |
removeAll ( ) | Removes all breadcrumbs. | |
removeCssClasses ( string | array $cssClasses ) | Removes one or more CSS classes that have been set by other methods. This method won't fail if the passed class has not been set already. | |
render ( ) : string | Renders the complete breadcrumbs into Twitter Bootstrap-compatible HTML. | |
setBreadcrumbs ( array $breadcrumbs ) | Sets all the breadcrumbs. Useful for quickly configuring the instance. | |
setCssClasses ( string | array $cssClasses ) |
Sets the CSS classes to be applied to the containing
|
|
setDivider ( string $divider ) | Sets the divider which will be printed between the breadcrumbs. | |
setListElement ( string $element ) | Set the containing list DOM element |
메소드 | 설명 | |
---|---|---|
renderCrumb ( string $name, string $href, boolean $isLast = false, number $position = null ) : string | Renders a single breadcrumb, Twitter Bootstrap-style. | |
renderCrumbs ( ) : string | Renders the crumbs one by one, and returns them concatenated. |
public __construct ( array $breadcrumbs = [], array $cssClasses = [] ) | ||
$breadcrumbs | array | |
$cssClasses | array |
public add ( string $name = '', string $href = '', boolean $hrefIsFullUrl = false ) | ||
$name | string | The name of this breadcrumb, which will be seen by the users. |
$href | string | If this parameter begins with a forward slash, it will be treated as a full URL, and the `$hrefIsFullUrl` parameter will be forced to `true`, regardless of its value. |
$hrefIsFullUrl | boolean | Whether the `$href` argument is a full URL or just a segment. The difference is that segments will be built upon previous breadcrumbs, while full URLs will be returned as they are inputted. This can be automatically forced to `true`, depending on the `$href` argument - read its description for details. |
public addCrumb ( string $name = '', string $href = '', boolean $hrefIsFullUrl = false ) | ||
$name | string | The name of this breadcrumb, which will be seen by the users. |
$href | string | If this parameter begins with a forward slash, it will be treated as a full URL, and the `$hrefIsFullUrl` parameter will be forced to `true`, regardless of its value. |
$hrefIsFullUrl | boolean | Whether the `$href` argument is a full URL or just a segment. The difference is that segments will be built upon previous breadcrumbs, while full URLs will be returned as they are inputted. This can be automatically forced to `true`, depending on the `$href` argument - read its description for details. |
public addCssClasses ( $cssClasses ) |
public getBreadcrumbs ( ) : array | ||
리턴 | array |
public getBreadcrumbsCssClasses ( ) : array | ||
리턴 | array |
public static isValidCrumb ( array $crumb ) : boolean | ||
$crumb | array | |
리턴 | boolean |
public removeCssClasses ( string | array $cssClasses ) | ||
$cssClasses | string | array |
protected renderCrumbs ( ) : string | ||
리턴 | string |
public setBreadcrumbs ( array $breadcrumbs ) | ||
$breadcrumbs | array |
public setCssClasses ( string | array $cssClasses ) | ||
$cssClasses | string | array |
public setDivider ( string $divider ) | ||
$divider | string |
public setListElement ( string $element ) | ||
$element | string |
protected array $breadcrumbs | ||
리턴 | array |
protected array $breadcrumbsCssClasses | ||
리턴 | array |
protected string $divider | ||
리턴 | string |