Avi documentation

HtmlElementBsCardBody extends HtmlElement
in package

Table of Contents

Properties

$parent  : mixed
$subtitle  : mixed
$text  : mixed
$title  : mixed
$attributes  : mixed
$content  : mixed
$params  : mixed
$tag  : mixed

Methods

__construct()  : HtmlElementBsCardBody
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
setAttrClass()  : mixed
setAttributeByParam()  : mixed
getTemplateByTag()  : string
Return the template use to format the element
parseParams()  : mixed
setAttributes()  : mixed
setContent()  : mixed

Properties

Methods

attributes()

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
HtmlElement

childContent()

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
string

dispatch()

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
HtmlElement

use()

Return the formated element as a string

public use() : string
Return values
string

child()

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
HtmlElement

parseAttributes()

Convert Attributes from array to a scring

protected parseAttributes() : string
Return values
string

parseContent()

Convert the content from array to string

protected parseContent() : string|array<string|int, mixed>|null
Return values
string|array<string|int, mixed>|null

setAttrClass()

protected setAttrClass(mixed $value[, mixed $merge = true ]) : mixed
Parameters
$value : mixed
$merge : mixed = true

setAttributeByParam()

protected setAttributeByParam(mixed $key) : mixed
Parameters
$key : mixed

getTemplateByTag()

Return the template use to format the element

private getTemplateByTag() : string
Return values
string

        
On this page

Search results