You are here

public static function Element::child in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Render/Element.php \Drupal\Core\Render\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.
template_preprocess_language_negotiation_configure_form in core/modules/language/language.admin.inc
Prepares variables for language negotiation configuration form.

File

core/lib/Drupal/Core/Render/Element.php, line 57
Contains \Drupal\Core\Render\Element.

Class

Element
Provides helper methods for Drupal render elements.

Namespace

Drupal\Core\Render

Code

public static function child($key) {
  return !isset($key[0]) || $key[0] != '#';
}