You are here

function _brightcove_field_get_object_formatter_keys in Brightcove Video Connect 7.7

Same name and namespace in other branches
  1. 7.2 brightcove_field/brightcove_field.module \_brightcove_field_get_object_formatter_keys()
  2. 7.3 brightcove_field/brightcove_field.module \_brightcove_field_get_object_formatter_keys()
  3. 7.4 brightcove_field/brightcove_field.module \_brightcove_field_get_object_formatter_keys()
  4. 7.5 brightcove_field/brightcove_field.module \_brightcove_field_get_object_formatter_keys()
  5. 7.6 brightcove.module \_brightcove_field_get_object_formatter_keys()

Brightcove video metadata properties.

Return value

array

4 calls to _brightcove_field_get_object_formatter_keys()
brightcove_field_formatter_settings_form in ./brightcove.module
Impelements hook_field_formatter_settings_form().
brightcove_field_formatter_settings_summary in ./brightcove.module
Implements hook_field_formatter_settings_summary().
brightcove_field_formatter_view in ./brightcove.module
Implements hook_field_formatter_view().
theme_brightcove_field_metadata in ./brightcove_field.formatters.inc
Theme function to render brightcove metadata.

File

./brightcove.module, line 1716
Brightcove module is an integration layer between any modules using Brightcove API. It makes all necessary checks for the API and makes settings available to the user.

Code

function _brightcove_field_get_object_formatter_keys($type = 'video') {
  $base = [
    'all' => t('All metadata'),
    'id' => t('Video ID'),
    'name' => t('Name'),
    'description' => t('Short description'),
    'referenceId' => t('Reference ID'),
  ];
  switch ($type) {
    case 'video':
      $base += [
        'longDescription' => t('Long description'),
        'createdAt' => t('Creation date'),
        'duration' => t('Length'),
        'customFields' => t('Custom fields'),
        'tags' => t('Tags'),
        'link' => t('Related link'),
      ];
      break;
    case 'playlist':
      $base += [];
      break;
  }
  return $base;
}