function Element::properties
Same name in other branches
- 9 core/lib/Drupal/Core/Render/Element.php \Drupal\Core\Render\Element::properties()
- 8.9.x core/lib/Drupal/Core/Render/Element.php \Drupal\Core\Render\Element::properties()
- 11.x core/lib/Drupal/Core/Render/Element.php \Drupal\Core\Render\Element::properties()
Gets properties of a structured array element (keys beginning with '#').
Parameters
array $element: An element array to return properties for.
Return value
array An array of property keys for the element.
3 calls to Element::properties()
- ElementTest::testProperties in core/
tests/ Drupal/ Tests/ Core/ Render/ ElementTest.php - Tests the properties() method.
- RendererTest::testRenderCacheProperties in core/
tests/ Drupal/ Tests/ Core/ Render/ RendererTest.php - Tests that #cache_properties are properly handled.
- TextFormat::processFormat in core/
modules/ filter/ src/ Element/ TextFormat.php - Expands an element into a base element with text format selector attached.
File
-
core/
lib/ Drupal/ Core/ Render/ Element.php, line 38
Class
- Element
- Provides helper methods for Drupal render elements.
Namespace
Drupal\Core\RenderCode
public static function properties(array $element) {
return array_filter(array_keys($element), [
static::class,
'property',
]);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.