Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Element.php

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.

1 call to Element::child()
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 51

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] != '#';
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal