You are here

function media_element_info in D7 Media 7

Same name and namespace in other branches
  1. 7.4 media.module \media_element_info()
  2. 7.2 media.module \media_element_info()
  3. 7.3 media.module \media_element_info()

Implements hook_element_info().

File

./media.module, line 897
Media API

Code

function media_element_info() {
  $types = array();
  $types['media'] = array(
    '#input' => TRUE,
    '#process' => array(
      'media_element_process',
    ),
    //'#value_callback' => 'media_element_value',
    '#element_validate' => array(
      'media_element_validate',
    ),
    '#theme_wrappers' => array(
      'container',
    ),
    '#progress_indicator' => 'throbber',
    '#extended' => FALSE,
    '#required' => FALSE,
    '#media_options' => array(
      'global' => array(
        'types' => array(),
        // Example: array('image', 'audio');
        'schemes' => array(),
      ),
    ),
    '#attributes' => array(
      'class' => array(
        'media-widget',
      ),
    ),
    '#attached' => array(
      'library' => array(
        array(
          'media',
          'media_browser',
        ),
      ),
    ),
  );
  return $types;
}