You are here

function media_23video_file_formatter_info in Media 23video 7

Implements hook_file_formatter_info().

File

./media_23video.module, line 90
23Video service for Media.

Code

function media_23video_file_formatter_info() {
  $formatters = array();
  foreach (_media_23video_get_settings('titles') as $formatter => $title) {
    $callbacks = array();
    foreach (array(
      'view',
      'settings',
    ) as $type) {
      $callbacks["{$type} callback"] = MEDIA_23VIDEO_MODULE_NAME . '_file_formatter_' . $formatter . '_' . $type;
    }
    $formatters[MEDIA_23VIDEO_MODULE_NAME . '_' . $formatter] = $callbacks + array(
      'label' => $title,
      'file types' => array(
        'video',
      ),
      'mime types' => array(
        MEDIA_23VIDEO_MIME,
      ),
      'default settings' => _media_23video_get_settings($formatter),
    );
  }
  return $formatters;
}