You are here

function element_info in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/includes/common.inc \element_info()

Retrieves the default properties for the defined element type.

Parameters

$type: An element type as defined by an element plugin.

Deprecated

in Drupal 8.0.0, will be removed before Drupal 9.0.0. Use \Drupal::service('element_info')->getInfo() instead.

7 string references to 'element_info'
ElementInfoManager::__construct in core/lib/Drupal/Core/Render/ElementInfoManager.php
Constructs a ElementInfoManager object.
FileWidget::create in core/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php
Creates an instance of the plugin.
KernelTestBaseTest::testRender in core/tests/Drupal/KernelTests/KernelTestBaseTest.php
@covers ::render
TextFormat::elementInfo in core/modules/filter/src/Element/TextFormat.php
Wraps the element info service.
ViewEditForm::create in core/modules/views_ui/src/ViewEditForm.php
Instantiates a new instance of this class.

... See full list

File

core/includes/common.inc, line 1006
Common functions that many Drupal modules will need to reference.

Code

function element_info($type) {
  return \Drupal::service('element_info')
    ->getInfo($type);
}