function element_info

element_info($type)

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.

File

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

Code

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

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!includes!common.inc/function/element_info/8.1.x