You are here

public static function Element::child in Render cache 7.2

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.

File

lib/Drupal/Core/Render/Element.php, line 56
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] != '#';
}