You are here

function media_elements in D7 Media 6

Implementation of hook_media_elements().

A Media File List element is created with the following FAPI: '#type' => 'media_file_list', '#options' => $options, // An associative array of filepaths, keyed by FID. '#title' => $title, // The translated title, displayed in the tab. '#description' => $description, // A translated description, to be displayed below the title.

File

./media.module, line 849
Media API

Code

function media_elements() {
  $elements = array();
  $elements['media_file_list'] = array(
    '#input' => TRUE,
    '#process' => array(
      'media_file_list_element_process',
    ),
    '#element_validate' => array(
      'media_file_list_element_validate',
    ),
    '#submit' => array(
      'media_file_list_element_submit',
    ),
  );
  return $elements;
}