|
| getGeneratedAttributes () |
| Return an augmented attributes array, including synthetic attributes which are created from other properties (like the classes array) but which shouldn't be retained in the user-visible attributes . More...
|
|
OOUI\Tag::__construct |
( |
|
$tag = 'div' | ) |
|
Create element.
- Parameters
-
Magic method implementation.
PHP doesn't allow __toString to throw exceptions and will trigger a fatal error if it does. This is a wrapper around the real toString() to convert them to errors instead.
- Returns
- string
OOUI\Tag::addClasses |
( |
array |
$classes | ) |
|
Add CSS classes.
- Parameters
-
array | $classes | List of classes to add |
- Returns
- $this
OOUI\Tag::appendContent |
( |
| ) |
|
Add content to the end.
Accepts variadic arguments (the $content argument can be repeated any number of times).
- Parameters
-
string | Tag | HtmlSnippet | $content | Content to append. Strings will be HTML-escaped for output, use a HtmlSnippet instance to prevent that. |
- Returns
- $this
OOUI\Tag::clearContent |
( |
| ) |
|
Remove all content.
- Returns
- $this
OOUI\Tag::ensureInfusableId |
( |
| ) |
|
Ensure that this given Tag is infusable and has a unique id
attribute.
- Returns
- $this
OOUI\Tag::getAttribute |
( |
|
$key | ) |
|
Get HTML attribute value.
- Parameters
-
string | $key | HTML attribute name |
- Returns
- string|null
OOUI\Tag::getElementGroup |
( |
| ) |
|
Get group element is in.
- Returns
- GroupElement|null Group element, null if none
OOUI\Tag::getGeneratedAttributes |
( |
| ) |
|
|
protected |
Return an augmented attributes
array, including synthetic attributes which are created from other properties (like the classes
array) but which shouldn't be retained in the user-visible attributes
.
- Returns
- array An attributes array.
OOUI\Tag::hasClass |
( |
|
$class | ) |
|
Check for CSS class.
- Parameters
-
string | $name | CSS class name |
- Returns
- boolean
OOUI\Tag::isInfusable |
( |
| ) |
|
Get client-side infusability.
- Returns
- boolean If this tag/element/widget can be referenced client-side.
OOUI\Tag::prependContent |
( |
| ) |
|
Add content to the beginning.
Accepts variadic arguments (the $content argument can be repeated any number of times).
- Parameters
-
string | Tag | HtmlSnippet | $content | Content to prepend. Strings will be HTML-escaped for output, use a HtmlSnippet instance to prevent that. |
- Returns
- $this
OOUI\Tag::removeAttributes |
( |
array |
$keys | ) |
|
Remove HTML attributes.
- Parameters
-
array | $keys | List of attribute keys to remove |
- Returns
- $this
OOUI\Tag::removeClasses |
( |
array |
$classes | ) |
|
Remove CSS classes.
- Parameters
-
array | $classes | List of classes to remove |
- Returns
- $this
OOUI\Tag::setAttributes |
( |
array |
$attributes | ) |
|
Add HTML attributes.
- Parameters
-
array | $attributes | List of attribute key/value pairs to add |
- Returns
- $this
OOUI\Tag::setElementGroup |
( |
|
$group | ) |
|
Set group element is in.
- Parameters
-
- Returns
- $this
OOUI\Tag::setInfusable |
( |
|
$infusable | ) |
|
Enable widget for client-side infusion.
- Parameters
-
boolean | $infusable | True to allow tag/element/widget to be referenced client-side. |
- Returns
- $this
OOUI\Tag::setValue |
( |
|
$value | ) |
|
Set value of input element ('value' attribute for most, element content for textarea).
- Parameters
-
- Returns
- $this
OOUI\Tag::toggleClasses |
( |
array |
$classes, |
|
|
|
$toggle = null |
|
) |
| |
Toggle CSS classes.
- Parameters
-
array | $classes | List of classes to add |
boolean | $toggle | Add classes |
- Returns
- $this
Render element into HTML.
- Returns
- string HTML serialization
- Exceptions
-
array OOUI\Tag::$attributes = array() |
|
protected |
Attributes.
HTML attributes
array OOUI\Tag::$classes = array() |
|
protected |
array OOUI\Tag::$content = array() |
|
protected |
Content.
Content text and elements
Group.
Group element is in
boolean OOUI\Tag::$infusable = false |
|
protected |
Infusion support.
Whether to serialize tag/element/widget state for client-side use.
string OOUI\Tag::$tag = '' |
|
protected |
Tag name for this instance.
HTML tag name
The documentation for this class was generated from the following file: