\Hazaar\Html
Details
Block HTML display element

Generic base class for an HTML block element. This class will render any block element of the defined type along with any child elements that have been set as it’s contents.

Tags

Since

1.0.0

Summary
Methods Properties Constants
add
get
key
set
No constants
Properties
$summary
$summary
Inherited
$type
$type
Methods
__construct()
__construct($content, $summary = null, $parameters = Array ( ) )

The HTML block element constructor. This allows a block element of any type to be constructed.

Tags

Since

1.2

Parameters

$contentmixed

Any content to add to the element. Content can be a string, an integer, another HTML element, or an array of any depth containing a mix of strings and HTML elements.

$summarymixed

A string or Summary object to add to the content as the summary.

$parametersarray

An array of parameters to apply to the block element.

add()
add() : \Hazaar\Html\Details

Add content items to the details block. If any of the arguments is a Summary object then it will be kept aside and prepended to the content during render.

Tags

Since

1.2

renderObject()
renderObject() : string

Render the object as a string. This method overrides the standard block render method so that the summary can be rendered at the beginning of the content section, and only once.

Tags

Since

1.2

Returns

string
Inherited
count()
count()
Inherited
current()
current()
Inherited
get()
get() : array

Get the contents of the block.

Tags

Since

2.0.0

Returns

array
Inherited
key()
key()
Inherited
next()
next()
Inherited
offsetExists()
offsetExists($key)

Parameters

$key

No description

Inherited
offsetGet()
offsetGet($key)

Parameters

$key

No description

Inherited
offsetSet()
offsetSet($key, $value)

Parameters

$key

No description

$value

No description

Inherited
offsetUnset()
offsetUnset($key)

Parameters

$key

No description

Inherited
prepend()
prepend($element) : \\Hazaar\\Html\\Block

Prepend an element to the beginning of the contents.

Tags

Since

1.0.0

Parameters

$element

No description

Returns

\\Hazaar\\Html\\Block
Inherited
renderElement()
renderElement($element) : string

Recursively render a child element.

Tags

Since

1.0.0

Parameters

$elementmixed

The element to render. Can be anything that can be converted to a string, or an array of other elements.

Returns

string
Inherited
renderObject()
renderObject() : string

Render the current object as an HTML string.

Tags

Since

1.0.0

Returns

string
Inherited
rewind()
rewind()
Inherited
set()
set() : \\Hazaar\\Html\\Block

Set one or more elements as the contents of the block.

Tags

Since

1.0.0

Inherited
valid()
valid()