function element_info_property

element_info_property($type, $property_name, $default = NULL)

Retrieves a single property for the defined element type.

Parameters

$type: An element type as defined by hook_element_info().

$property_name: The property within the element type that should be returned.

$default: (Optional) The value to return if the element type does not specify a value for the property. Defaults to NULL.

File

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

Code

function element_info_property($type, $property_name, $default = NULL) {
  return (($info = element_info($type)) && array_key_exists($property_name, $info)) ? $info[$property_name] : $default;
}

© 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/includes!common.inc/function/element_info_property/7.x