HtmlElementBsBreadcrumb
extends HtmlElementBsItems
in package
Table of Contents
Properties
- $items : mixed
- $parent : mixed
- $attributes : mixed
- $child : mixed
- $children : mixed
- $content : mixed
- $params : mixed
- $prefix : mixed
- $tag : mixed
Methods
- __construct() : HtmlElementBsBreadcrumb
- attributes() : HtmlElement
- Add new attributes to element
- childContent() : mixed
- content() : string
- Set the element content and return the formated element as a string
- dispatch() : mixed
- Display the content
- element() : object
- Call a new class which extend current HtmlElementClass
- parseParam() : mixed
- tag() : HtmlElement
- Instantiate a new object using tag name
- use() : string
- Return the formated element as a string
- child() : HtmlElement
- Instantiate a child element
- parseAttributes() : string
- Convert Attributes from array to a scring
- parseContent() : string|array<string|int, mixed>|null
- Convert the content from array to string
- parseElementContent() : mixed
- parseItems() : mixed
- Items: |- href |- active |- text {@inheritDoc}
- parseParams() : mixed
- setAttrClass() : mixed
- setAttributeByParam() : mixed
- setAttributes() : mixed
- setContent() : mixed
- getTemplateByTag() : string
- Return the template use to format the element
- parseItemElement() : mixed
- privateParseItems() : mixed
- privateParseParams() : mixed
- setAttributesDivider() : mixed
Properties
$items
public
mixed
$items
$parent
public
mixed
$parent
$attributes
protected
mixed
$attributes
$child
protected
mixed
$child
$children
protected
mixed
$children
= []
$content
protected
mixed
$content
$params
protected
mixed
$params
$prefix
protected
mixed
$prefix
= ''
$tag
protected
mixed
$tag
= 'nav'
Methods
__construct()
public
__construct([array<string|int, mixed> $params = [] ][, mixed $parent = null ]) : HtmlElementBsBreadcrumb
Parameters
- $params : array<string|int, mixed> = []
- $parent : mixed = null
Return values
HtmlElementBsBreadcrumbattributes()
Add new attributes to element
public
attributes([array<string|int, mixed>|null $attributes = [] ][, bool $mergeValues = true ]) : HtmlElement
Parameters
- $attributes : array<string|int, mixed>|null = []
-
The the attributes must be included in one array, each member having any of the following format:
- single attribute: $attributes = ['disabled']
- associative: $atributes = ['type'=>'input', 'value'=>3]
- associative multiple keys: $attributes = ['data' => ['role' => 'content', 'content' => 'button']]
- assocuative multiple values: $attributes = ['class' => 'btn btn-sm']
- $mergeValues : bool = true
-
- merge new values true | false
Return values
HtmlElementchildContent()
public
childContent(mixed $name[, mixed $return = false ]) : mixed
Parameters
- $name : mixed
- $return : mixed = false
content()
Set the element content and return the formated element as a string
public
content([array<string|int, mixed>|string|null $content = null ][, mixed $return = false ]) : string
Parameters
- $content : array<string|int, mixed>|string|null = null
- $return : mixed = false
Return values
stringdispatch()
Display the content
public
dispatch([array<string|int, mixed>|string|null $content = null ]) : mixed
Parameters
- $content : array<string|int, mixed>|string|null = null
element()
Call a new class which extend current HtmlElementClass
public
element(string $element[, array<string|int, mixed>|string $properties = [] ][, mixed $root = null ]) : object
Parameters
- $element : string
-
- defined element
- $properties : array<string|int, mixed>|string = []
- $root : mixed = null
Return values
object —defeined in extended class
parseParam()
public
parseParam(mixed $key[, mixed $default = null ]) : mixed
Parameters
- $key : mixed
- $default : mixed = null
tag()
Instantiate a new object using tag name
public
tag(string|null $tag[, mixed $attributes = null ][, mixed $newElement = true ][, mixed $instance = null ]) : HtmlElement
Parameters
- $tag : string|null
-
element tag
- $attributes : mixed = null
- $newElement : mixed = true
- $instance : mixed = null
Return values
HtmlElementuse()
Return the formated element as a string
public
use() : string
Return values
stringchild()
Instantiate a child element
protected
child(string $name, string $type[, array<string|int, mixed> $defaultAttributes = [] ]) : HtmlElement
Parameters
- $name : string
-
- the child name
- $type : string
-
- the element type | html-tag
- $defaultAttributes : array<string|int, mixed> = []
Return values
HtmlElementparseAttributes()
Convert Attributes from array to a scring
protected
parseAttributes() : string
Return values
stringparseContent()
Convert the content from array to string
protected
parseContent() : string|array<string|int, mixed>|null
Return values
string|array<string|int, mixed>|nullparseElementContent()
protected
parseElementContent([mixed $content = null ]) : mixed
Parameters
- $content : mixed = null
parseItems()
Items: |- href |- active |- text {@inheritDoc}
protected
parseItems() : mixed
Tags
parseParams()
protected
parseParams() : mixed
setAttrClass()
protected
setAttrClass(mixed $value[, mixed $merge = true ]) : mixed
Parameters
- $value : mixed
- $merge : mixed = true
setAttributeByParam()
protected
setAttributeByParam(mixed $key) : mixed
Parameters
- $key : mixed
setAttributes()
protected
setAttributes() : mixed
setContent()
protected
setContent() : mixed
getTemplateByTag()
Return the template use to format the element
private
getTemplateByTag() : string
Return values
stringparseItemElement()
private
parseItemElement(mixed $htmlElement) : mixed
Parameters
- $htmlElement : mixed
privateParseItems()
private
privateParseItems() : mixed
privateParseParams()
private
privateParseParams() : mixed
setAttributesDivider()
private
setAttributesDivider() : mixed