function Element::child
Checks if the key is a child.
Parameters
string $key: The key to check.
Return value
bool TRUE if the element is a child, FALSE otherwise.
2 calls to Element::child()
- ElementTest::testChild in core/
tests/ Drupal/ Tests/ Core/ Render/ ElementTest.php - Tests the child() method.
- LanguageThemeHooks::preprocessLanguageNegotiationConfigureForm in core/
modules/ language/ src/ Hook/ LanguageThemeHooks.php - Prepares variables for language negotiation configuration form.
File
-
core/
lib/ Drupal/ Core/ Render/ Element.php, line 51
Class
- Element
- Provides helper methods for Drupal render elements.
Namespace
Drupal\Core\RenderCode
public static function child($key) {
return !isset($key[0]) || $key[0] != '#';
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.