You are here

public function Element::getProperty in Express 8

Retrieves the render array for the element.

Parameters

string $name: The name of the element property to retrieve, not including the # prefix.

mixed $default: The default to set if property does not exist.

Return value

mixed The property value, NULL if not set.

9 calls to Element::getProperty()
Element::appendProperty in themes/contrib/bootstrap/src/Utility/Element.php
Appends a property with a value.
Element::colorize in themes/contrib/bootstrap/src/Utility/Element.php
Adds a specific Bootstrap class to color a button based on its text value.
Element::getContext in themes/contrib/bootstrap/src/Utility/Element.php
Retrieves a context value from the #context element property, if any.
Element::isPropertyEmpty in themes/contrib/bootstrap/src/Utility/Element.php
Indicates whether a property on the element is empty.
Element::isType in themes/contrib/bootstrap/src/Utility/Element.php
Checks if the element is a specific type of element.

... See full list

File

themes/contrib/bootstrap/src/Utility/Element.php, line 364
Contains \Drupal\bootstrap\Utility\Element.

Class

Element
Provides helper methods for Drupal render elements.

Namespace

Drupal\bootstrap\Utility

Code

public function &getProperty($name, $default = NULL) {
  return $this
    ->offsetGet("#{$name}", $default);
}