function element_info

7.x element_info($type)

Retrieves the default properties for the defined element type.


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

11 calls to element_info()
ajax_prepare_response in drupal/includes/
Converts the return value of a page callback into an Ajax commands array.
drupal_deliver_html_page in drupal/includes/
Packages and sends the result of a page callback to the browser as HTML.
drupal_prepare_form in drupal/includes/
Prepares a structured form array.
drupal_render in drupal/includes/
Renders HTML given a structured array tree.
drupal_render_page in drupal/includes/
Renders the page, including all theming.

... See full list


drupal/includes/, line 6278
Common functions that many Drupal modules will need to reference.


function element_info($type) {
  // Use the advanced drupal_static() pattern, since this is called very often.
  static $drupal_static_fast;
  if (!isset($drupal_static_fast)) {
    $drupal_static_fast['cache'] = &drupal_static(__FUNCTION__);
  $cache = &$drupal_static_fast['cache'];

  if (!isset($cache)) {
    $cache = module_invoke_all('element_info');
    foreach ($cache as $element_type => $info) {
      $cache[$element_type]['#type'] = $element_type;
    // Allow modules to alter the element type defaults.
    drupal_alter('element_info', $cache);

  return isset($cache[$type]) ? $cache[$type] : array();