function ElementInterface::removeChild

Removes a child.

Parameters

int|string $name: The name of the child. Can also be an integer.

Return value

?\Drupal\Core\Render\Element\ElementInterface The removed render object if any, or NULL if the child could not be found.

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

File

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

Class

ElementInterface
Provides an interface for render element plugins.

Namespace

Drupal\Core\Render\Element

Code

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

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