class Element
Provides helper methods for Drupal render elements.
Hierarchy
- class \Drupal\bootstrap\Utility\ArrayObject implements \IteratorAggregate, \ArrayAccess, \Serializable, \Countable, \Drupal\Core\Render\AttachmentsInterface, \Drupal\Core\Cache\RefinableCacheableDependencyInterface
- class \Drupal\bootstrap\Utility\DrupalAttributes
- class \Drupal\bootstrap\Utility\Element
- class \Drupal\bootstrap\Utility\DrupalAttributes
Expanded class hierarchy of Element
See Also
Related topics
Namespace
Drupal\bootstrap\UtilityMembers
Name | Modifiers | Type | Description |
---|---|---|---|
ArrayObject:: |
protected | property | The array. |
ArrayObject:: |
public | function | |
ArrayObject:: |
public | function | |
ArrayObject:: |
public | function | |
ArrayObject:: |
public | function | |
ArrayObject:: |
public | function | Appends the value. |
ArrayObject:: |
public | function | Sort the entries by value. |
ArrayObject:: |
public | function | Merges an object's cacheable metadata into the variables array. |
ArrayObject:: |
public | function | Merges a render array's cacheable metadata into the variables array. |
ArrayObject:: |
public | function | Get the number of public properties in the ArrayObject. |
ArrayObject:: |
public | function | Creates a copy of the ArrayObject. |
ArrayObject:: |
public | function | |
ArrayObject:: |
public | function | |
ArrayObject:: |
public | function | |
ArrayObject:: |
public | function | |
ArrayObject:: |
public | function | Creates a new iterator from an ArrayObject instance. |
ArrayObject:: |
public | function | Sort the entries by key. |
ArrayObject:: |
public | function | Merges multiple values into the array. |
ArrayObject:: |
public | function | |
ArrayObject:: |
public | function | Sort an array using a case insensitive "natural order" algorithm. |
ArrayObject:: |
public | function | Sort entries using a "natural order" algorithm. |
ArrayObject:: |
public | function | Returns whether the requested key exists. |
ArrayObject:: |
public | function | Returns the value at the specified key. |
ArrayObject:: |
public | function | Sets the value at the specified key to value. |
ArrayObject:: |
public | function | Unsets the value at the specified key. |
ArrayObject:: |
public | function | Serialize an ArrayObject. |
ArrayObject:: |
public | function | |
ArrayObject:: |
public | function | Sort entries with a user-defined function and maintain key association. |
ArrayObject:: |
public | function | Sort the entries by keys using a user-defined comparison function. |
ArrayObject:: |
public | function | Unserialize an ArrayObject. |
DrupalAttributes:: |
protected | property | Stored attribute instances. |
DrupalAttributes:: |
public | function | Add class(es) to an attributes object. |
DrupalAttributes:: |
constant | Defines the "attributes" storage type constant. | |
DrupalAttributes:: |
constant | Defines the "body_attributes" storage type constant. | |
DrupalAttributes:: |
constant | Defines the "content_attributes" storage type constant. | |
DrupalAttributes:: |
constant | Defines the "description_attributes" storage type constant. | |
DrupalAttributes:: |
constant | Defines the "footer_attributes" storage type constant. | |
DrupalAttributes:: |
public | function | Retrieve a specific attribute from an attributes object. |
DrupalAttributes:: |
public | function | Retrieves a specific attributes object. |
DrupalAttributes:: |
public | function | Retrieves classes from an attributes object. |
DrupalAttributes:: |
public | function | Indicates whether an attributes object has a specific attribute set. |
DrupalAttributes:: |
public | function | Indicates whether an attributes object has a specific class. |
DrupalAttributes:: |
constant | Defines the "header_attributes" storage type constant. | |
DrupalAttributes:: |
constant | Defines the "heading_attributes" storage type constant. | |
DrupalAttributes:: |
constant | Defines the "input_group_attributes" storage type constant. | |
DrupalAttributes:: |
constant | Defines the "label_attributes" storage type constant. | |
DrupalAttributes:: |
constant | Defines the "navbar_attributes" storage type constant. | |
DrupalAttributes:: |
public | function | Removes an attribute from an attributes object. |
DrupalAttributes:: |
public | function | Removes a class from an attributes object. |
DrupalAttributes:: |
public | function | Replaces a class in an attributes object. |
DrupalAttributes:: |
public | function | Sets an attribute on an attributes object. |
DrupalAttributes:: |
public | function | Sets multiple attributes on an attributes object. |
DrupalAttributes:: |
constant | Defines the "split_button_attributes" storage type constant. | |
DrupalAttributes:: |
constant | Defines the "title_attributes" storage type constant. | |
DrupalAttributes:: |
constant | Defines the "wrapper_attributes" storage type constant. | |
Element:: |
protected | property |
A prefix to use for retrieving attribute keys from the array. Overrides DrupalAttributes:: |
Element:: |
protected | property | The current state of the form. |
Element:: |
protected | property | The element type. |
Element:: |
public | function | Sets the #access property on an element. |
Element:: |
public | function | Appends a property with a value. |
Element:: |
public | function | Identifies the children of an element array, optionally sorted by weight. |
Element:: |
public | function | Retrieves the children of an element array, optionally sorted by weight. |
Element:: |
public | function | Adds a specific Bootstrap class to color a button based on its text value. |
Element:: |
public static | function | Creates a new \Drupal\bootstrap\Utility\Element instance. |
Element:: |
public static | function | Creates a new standalone \Drupal\bootstrap\Utility\Element instance. |
Element:: |
public | function |
Exchange the array for another one. Overrides ArrayObject:: |
Element:: |
public | function | Traverses the element to find the closest button. |
Element:: |
public | function | Retrieves the render array for the element. |
Element:: |
public | function | Retrieves a context value from the #context element property, if any. |
Element:: |
public | function | Returns the error message filed against the given form element. |
Element:: |
public | function | Retrieves the render array for the element. |
Element:: |
public | function | Returns the visible children of an element. |
Element:: |
public | function | Indicates whether the element has an error set. |
Element:: |
public | function | Indicates whether the element has a specific property. |
Element:: |
public | function | Indicates whether the element is a button. |
Element:: |
public | function | Indicates whether the given element is empty. |
Element:: |
public | function | Indicates whether a property on the element is empty. |
Element:: |
public static | function | Checks if a value is a render array. |
Element:: |
public | function | Checks if the element is a specific type of element. |
Element:: |
public | function | Determines if an element is visible. |
Element:: |
public | function | Maps an element's properties to its attributes array. |
Element:: |
public | function | Prepends a property with a value. |
Element:: |
public | function | Gets properties of a structured array element (keys beginning with '#'). |
Element:: |
public | function | Renders the final element HTML. |
Element:: |
public | function | Renders the final element HTML. |
Element:: |
public | function | Renders the final element HTML. |
Element:: |
public | function | Adds Bootstrap button size class to the element. |
Element:: |
public | function | Flags an element as having an error. |
Element:: |
public | function | Sets the current form state for the element. |
Element:: |
public | function | Adds an icon to button element based on its text value. |
Element:: |
public | function | Sets the value for a property. |
Element:: |
public | function | Converts an element description into a tooltip based on certain criteria. |
Element:: |
public | function | Removes a property from the element. |
Element:: |
public | function |
Element constructor. Overrides ArrayObject:: |
Element:: |
public | function |
Magic get method. Overrides ArrayObject:: |
Element:: |
public | function |
Magic isset method. Overrides ArrayObject:: |
Element:: |
public | function |
Magic set method. Overrides ArrayObject:: |
Element:: |
public | function |
Magic unset method. Overrides ArrayObject:: |