Class Element
An HTML element.
The Element
class can create any kind of HTML element. It
supports class names, dataset, children. It handles values and default values.
It can decorate the HTML element with a label, a legend and a description.
This is the base class to all element types.
- ICanBoogie\Object implements ICanBoogie\ToArrayRecursive uses ICanBoogie\ToArrayRecursiveTrait, ICanBoogie\PrototypeTrait
- Brickrouge\Element implements ArrayAccess, IteratorAggregate, Brickrouge\HTMLStringInterface
Direct known subclasses
Brickrouge\A
,
Brickrouge\Actions
,
Brickrouge\Modal
,
Brickrouge\Pager
,
Brickrouge\Popover
,
Brickrouge\Ranger
,
Brickrouge\Renderer\Simple
,
Brickrouge\Salutation
,
Brickrouge\Searchbox
,
Brickrouge\Section
,
Brickrouge\SplitButton
,
Brickrouge\Text
,
Brickrouge\Alert
,
Brickrouge\Widget
,
Brickrouge\Widget\TimeZone
,
Icybee\Element\Actionbar
,
Icybee\Element\ActionbarContextual
,
Icybee\Element\ActionbarNav
,
Icybee\Element\ActionbarSearch
,
Icybee\Element\ActionbarTitle
,
Icybee\Element\ActionbarToolbar
,
Icybee\Element\AdminMenu
,
Icybee\Element\Navigation
,
Brickrouge\Button
,
Icybee\Element\SiteMenu
,
Icybee\Element\UserMenu
,
Icybee\Installer\InstallForm
,
Icybee\Installer\LanguageElement
,
Icybee\Installer\WelcomePanel
,
Icybee\InterlockBlock
,
Icybee\ManageBlock
,
Icybee\Modules\Dashboard\DashboardBlock
,
Icybee\Modules\Editor\FeedEditorElement
,
Icybee\Modules\Editor\MultiEditorElement
,
Brickrouge\DateRange
,
Icybee\Modules\Editor\NodeEditorElement
,
Icybee\Modules\Editor\PatronEditorElement
,
Icybee\Modules\Editor\PHPEditorElement
,
Icybee\Modules\Editor\RawEditorElement
,
Icybee\Modules\Editor\RTEEditorElement
,
Icybee\Modules\Editor\SelectorElement
,
Icybee\Modules\Editor\TabbableEditorElement
,
Icybee\Modules\Editor\TextmarkEditorElement
,
Icybee\Modules\Editor\WidgetsEditorElement
,
Icybee\Modules\Forms\PopForm
,
Brickrouge\DropdownMenu
,
Icybee\Modules\I18n\NodeLanguageElement
,
Icybee\Modules\I18n\NodeNativeElement
,
Icybee\Modules\Images\PopOrUploadImage
,
Icybee\Modules\Nodes\AdjustNode
,
Icybee\Modules\Pages\BreadcrumbElement
,
Icybee\Modules\Pages\LanguagesElement
,
Icybee\Modules\Pages\NavigationBranchElement
,
Icybee\Modules\Pages\NavigationElement
,
Icybee\Modules\Pages\PopPage
,
Icybee\Modules\Pages\PopTemplate
,
Brickrouge\File
,
Icybee\Modules\Taxonomy\Vocabulary\CloudElement
,
Icybee\Modules\Users\AvailableSitesBlock
,
Icybee\Modules\Users\LoginComboElement
,
Icybee\Modules\Views\ViewEditorElement
,
Brickrouge\Form
,
Brickrouge\Group
,
Brickrouge\ListView
Indirect known subclasses
Brickrouge\Date
,
Brickrouge\DateTime
,
ICanBoogie\Modules\Thumbnailer\AdjustThumbnailVersion
,
ICanBoogie\Modules\Thumbnailer\PopThumbnailVersion
,
Icybee\DeleteBlock
,
Icybee\Element\ActionbarNew
,
Icybee\Element\Form
,
Icybee\Element\Group
,
Icybee\Installer\DatabaseForm
,
Icybee\Installer\PanelForm
,
Icybee\Installer\SiteForm
,
Icybee\Installer\TellMeMore
,
Brickrouge\Element\Nodes\Pager
,
Icybee\Installer\UserForm
,
Icybee\Modules\Cache\ManageBlock
,
Icybee\Modules\Comments\DeleteBlock
,
Icybee\Modules\Comments\ManageBlock
,
Icybee\Modules\Comments\SubmitForm
,
Icybee\Modules\Contents\DeleteBlock
,
Icybee\Modules\Contents\ManageBlock
,
Icybee\Modules\Editor\ImageEditorElement
,
Icybee\Modules\Editor\TextEditorElement
,
Icybee\Modules\Files\FileUpload
,
Brickrouge\PopoverWidget
,
Icybee\Modules\Files\ManageBlock
,
Icybee\Modules\Forms\ContactForm
,
Icybee\Modules\Forms\EmailComposer
,
Icybee\Modules\Forms\FormEditorElement
,
Icybee\Modules\Forms\ManageBlock
,
Icybee\Modules\Forms\PressContactForm
,
Icybee\Modules\Forms\QuickContactForm
,
Icybee\Modules\Images\AdjustImage
,
Icybee\Modules\Images\AdjustThumbnail
,
Icybee\Modules\Images\GalleryBlock
,
Brickrouge\Widget\AdjustImage
,
Icybee\Modules\Images\ImageUpload
,
Icybee\Modules\Images\ManageBlock
,
Icybee\Modules\Images\PopImage
,
Icybee\Modules\Images\UploadImage
,
Icybee\Modules\Members\ManageBlock
,
Icybee\Modules\Modules\InactivesBlock
,
Icybee\Modules\Modules\ManageBlock
,
Icybee\Modules\Nodes\DeleteBlock
,
Icybee\Modules\Nodes\ExportBlock
,
Icybee\Modules\Nodes\ManageBlock
,
Brickrouge\Widget\AdjustNode
,
Icybee\Modules\Nodes\PopNode
,
Icybee\Modules\Nodes\TitleSlugCombo
,
Icybee\Modules\Pages\ExportBlock
,
Icybee\Modules\Pages\ManageBlock
,
Icybee\Modules\Sites\DeleteBlock
,
Icybee\Modules\Sites\ManageBlock
,
Icybee\Modules\Taxonomy\Terms\DeleteBlock
,
Icybee\Modules\Taxonomy\Terms\ManageBlock
,
Icybee\Modules\Taxonomy\Vocabulary\DeleteBlock
,
Icybee\Modules\Taxonomy\Vocabulary\ManageBlock
,
Brickrouge\Widget\AdjustThumbnail
,
Icybee\Modules\Users\DeleteBlock
,
Icybee\Modules\Users\LoginForm
,
Icybee\Modules\Users\ManageBlock
,
Icybee\Modules\Users\NonceLogin\NonceRequestForm
,
Icybee\Modules\Users\Roles\DeleteBlock
,
Icybee\Modules\Users\Roles\ManageBlock
,
WdEMailNotifyElement
,
Brickrouge\Widget\AdjustThumbnailVersion
,
Brickrouge\Widget\PopThumbnailVersion
,
ICanBoogie\Modules\Thumbnailer\AdjustThumbnailOptions
See: http://dev.w3.org/html5/spec/Overview.html#embedding-custom-non-visible-data-with-the-data-attributes
Located at vendor/brickrouge/brickrouge/lib/element.php
Methods summary
protected static
|
|
protected static
|
|
public static
string
|
|
public
|
|
public
boolean
|
|
public
mixed|null
|
|
public
|
|
public
|
|
public
|
|
protected
|
|
protected
|
|
protected
|
|
protected
string
|
|
protected
string
|
|
protected
|
|
public
|
|
public
|
|
public
boolean
|
|
protected
array
|
|
protected
string
|
|
public
|
#
adopt( string|
Add a child or children to the element. |
public
array[int]Element|string
|
|
protected
string
|
#
render_child(
Returns the HTML representation of a child element. |
protected
string
|
|
protected
string|null
|
|
protected
string
|
|
protected
string
|
|
protected
string
|
#
render_inner_html_for_checkbox_group( )
Renders inner HTML of |
protected
string
|
#
render_inner_html_for_radio_group( )
Renders inner HTML of |
protected
array
|
|
protected
string
|
|
protected
array
|
|
protected
string
|
|
protected
string
|
|
protected
string
|
|
protected
string
|
#
decorate_with_label( string $html, string $label )
Decorates the specified HTML with specified label. |
protected
string
|
#
decorate_with_legend( string $html, string $legend )
Decorates the specified HTML with a fieldset and the specified legend. |
protected
string
|
#
decorate_with_inline_help( string $html, string $help )
Decorates the specified HTML with an inline help element. |
protected
string
|
#
decorate_with_description( string $html, string $description )
Decorates the specified HTML with the specified description. |
public
string
|
|
public
string
|
|
public
boolean
|
Methods inherited from ICanBoogie\Object
from()
,
resolve_facade_properties()
,
resolve_private_properties()
,
to_array()
,
to_json()
Methods inherited from ICanBoogie\ToArrayRecursive
Methods used from ICanBoogie\ToArrayRecursiveTrait
Methods used from ICanBoogie\PrototypeTrait
__call()
,
__get()
,
__set()
,
__sleep()
,
__wakeup()
,
get_prototype()
,
has_method()
,
has_property()
,
last_chance_get()
,
last_chance_set()
Magic methods summary
Constants summary
string |
TYPE_CHECKBOX
|
'#checkbox' |
#
Custom type used to create checkbox elements. |
string |
TYPE_CHECKBOX_GROUP
|
'#checkbox-group' |
#
Custom type used to create checkbox group elements. |
string |
TYPE_RADIO
|
'#radio' |
#
Custom type used to create radio elements. |
string |
TYPE_RADIO_GROUP
|
'#radio-group' |
#
Custom type used to create radio group elements. |
string |
CHILDREN
|
'#children' |
#
Used to define the children of an element. |
string |
DEFAULT_VALUE
|
'#default-value' |
#
Used to define the default value of an element. |
string |
DESCRIPTION
|
'#description' |
#
Used to define the description block of an element. |
string |
GROUP
|
'#group' |
#
Used to define the group of an element. |
string |
GROUPS
|
'#groups' |
#
Used to define the groups that can be used by children elements. |
string |
INLINE_HELP
|
'#inline-help' |
#
Used to define the inline help of an element. |
string |
INNER_HTML
|
'#inner-html' |
#
Used to define the inner HTML of an element. If the value of the tag is null, the markup will be self-closing. |
string |
LABEL
|
'#label' |
#
Used to define the label of an element. |
string |
LABEL_POSITION
|
'#label-position' |
#
Used to define the position of the label. Possible positions are "before", "after" and "above". Defaults to "after". |
string |
LABEL_MISSING
|
'#label-missing' |
|
string |
LEGEND
|
'#element-legend' |
#
Used to define the legend of an element. If the legend is defined the element is wrapped into a fieldset when it is rendered. |
string |
REQUIRED
|
'required' |
#
Used to define the required state of an element. |
string |
OPTIONS
|
'#options' |
#
Used to define the options of the following element types: "select", |
string |
OPTIONS_DISABLED
|
'#options-disabled' |
#
Used to define which options are disabled. |
string |
STATE
|
'#state' |
#
Used to define the state of the element: "success", "warning" or "error". |
string |
VALIDATOR
|
'#validator' |
#
Used to define the validator of an element. The validator is defined using an array made of a callback and a possible userdata array. |
string |
VALIDATOR_OPTIONS
|
'#validator-options' |
|
string |
WEIGHT
|
'#weight' |
#
Use to define the weight of an element. This attribute can be used to reorder children when a parent element is rendered. |
string |
WIDGET_CONSTRUCTOR
|
'#widget-constructor' |
#
The name of the Javascript constructor that should be used to construct the widget. |
Properties summary
protected static
integer
|
$auto_element_id |
#
Next available auto element id index. |
public
string
|
$type |
#
Type if the element, as provided during |
public
string
|
$tag_name |
#
Tag name of the rendered HTML element. |
public
array
|
$children |
#
An array containing the children of the element. |
protected
array[string]mixed
|
$tags |
#
Tags of the element, including HTML and special attributes. |
protected
string|null
|
$inner_html |
#
Inner HTML of the element. |
protected
array
|
$class_names |
#
Class names used to compose the value of the |
Magic properties
public
string
|
$class |
|
#
Assigns a class name or set of class names to an element. Any number of elements may be assigned the same class name or names. Multiple class names must be separated by white space characters. |
public
|
$dataset |
|
#
The dataset property provides a convenient mapping to the data-* attributes on an element. |
public
string
|
$id |
|
#
Assigns an identifier to an element. This identifier mush be unique in a document. |