function RenderElementBase::getChildren

Returns child elements.

Return value

\Traversable<\Drupal\Core\Render\Element\ElementInterface> Keys will be children names, values are render objects.

Overrides ElementInterface::getChildren

File

core/lib/Drupal/Core/Render/Element/RenderElementBase.php, line 647

Class

RenderElementBase
Provides a base class for render element plugins.

Namespace

Drupal\Core\Render\Element

Code

public function getChildren() : \Traversable {
  foreach (Element::children($this->storage) as $key) {
    (yield $key => $this->elementInfoManager()
      ->fromRenderable($this->storage[$key]));
  }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.