public function Element::children in Express 8
Retrieves the children of an element array, optionally sorted by weight.
The children of a element array are those key/value pairs whose key does not start with a '#'. See drupal_render() for details.
Parameters
bool $sort: Boolean to indicate whether the children should be sorted by weight.
Return value
\Drupal\bootstrap\Utility\Element[] An array child elements.
1 call to Element::children()
- Element::setProperty in themes/
contrib/ bootstrap/ src/ Utility/ Element.php - Sets the value for a property.
File
- themes/
contrib/ bootstrap/ src/ Utility/ Element.php, line 198 - Contains \Drupal\bootstrap\Utility\Element.
Class
- Element
- Provides helper methods for Drupal render elements.
Namespace
Drupal\bootstrap\UtilityCode
public function children($sort = FALSE) {
$children = [];
foreach ($this
->childKeys($sort) as $child) {
$children[$child] = new self($this->array[$child]);
}
return $children;
}