function ElementInterface::getChild

Gets a child.

Parameters

int|string|list<int|string> $name: The name of the child. Can also be an integer. Or a list of these. It is an integer when the field API uses the delta for children.

Return value

?\Drupal\Core\Render\Element\ElementInterface The child render object.

1 method overrides ElementInterface::getChild()
RenderElementBase::getChild in core/lib/Drupal/Core/Render/Element/RenderElementBase.php
Gets a child.

File

core/lib/Drupal/Core/Render/Element/ElementInterface.php, line 106

Class

ElementInterface
Provides an interface for render element plugins.

Namespace

Drupal\Core\Render\Element

Code

public function getChild(int|string|array $name) : ?ElementInterface;

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