public function Element::__get in Express 8
Magic get method.
This is only for child elements, not properties.
Parameters
string $key: The name of the child element to retrieve.
Return value
\Drupal\bootstrap\Utility\Element The child element object.
Throws
\InvalidArgumentException Throws this error when the name is a property (key starting with #).
Overrides ArrayObject::__get
File
- themes/
contrib/ bootstrap/ src/ Utility/ Element.php, line 73 - Contains \Drupal\bootstrap\Utility\Element.
Class
- Element
- Provides helper methods for Drupal render elements.
Namespace
Drupal\bootstrap\UtilityCode
public function &__get($key) {
if (\Drupal\Core\Render\Element::property($key)) {
throw new \InvalidArgumentException('Cannot dynamically retrieve element property. Please use \\Drupal\\bootstrap\\Utility\\Element::getProperty instead.');
}
$instance = new self($this
->offsetGet($key, []));
return $instance;
}