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

Breadcrumb

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

function Element::property

Checks if the key is a property.

Parameters

string $key: The key to check.

Return value

bool TRUE of the key is a property, FALSE otherwise.

File

core/lib/Drupal/Core/Render/Element.php, line 25

Class

Element
Provides helper methods for Drupal render elements.

Namespace

Drupal\Core\Render

Code

public static function property($key) {
    return is_string($key) && $key[0] == '#';
}

API Navigation

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