public static Element::getVisibleChildren(array $elements)
Returns the visible children of an element.
array $elements: The parent element.
array The array keys of the element's visible children.
public static function getVisibleChildren(array $elements) { $visible_children = array(); foreach (static::children($elements) as $key) { $child = $elements[$key]; // Skip value and hidden elements, since they are not rendered. if (!static::isVisibleElement($child)) { continue; } $visible_children[$key] = $child; } return array_keys($visible_children); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Render!Element.php/function/Element::getVisibleChildren/8.1.x