You are here

function brightcove_field_menu in Brightcove Video Connect 7.3

Same name and namespace in other branches
  1. 7.2 brightcove_field/brightcove_field.module \brightcove_field_menu()
  2. 7.4 brightcove_field/brightcove_field.module \brightcove_field_menu()
  3. 7.5 brightcove_field/brightcove_field.module \brightcove_field_menu()

Implementation of hook_menu().

File

brightcove_field/brightcove_field.module, line 39
Brightcove field module provides a Content Construction Kit module to developers, allowing them to browse videos in their Brightcove Studio and upload them.

Code

function brightcove_field_menu() {
  $items = array();

  // bc object type, entity type, field name
  $items['brightcove_field/autocomplete/video/%/%'] = array(
    'title' => 'Brightcove field autocomplete',
    'page callback' => 'brightcove_field_autocomplete',
    'page arguments' => array(
      2,
      4,
      6,
    ),
    'access callback' => 'brightcove_field_browse_access',
    'access arguments' => array(
      'browse videos',
      3,
      4,
      5,
    ),
    'file' => 'brightcove_field.browse.inc',
    'type' => MENU_CALLBACK,
  );
  $items['brightcove_field/autocomplete/playlist/%/%'] = array(
    'title' => 'Brightcove field autocomplete',
    'page callback' => 'brightcove_field_autocomplete',
    'page arguments' => array(
      2,
      4,
      6,
    ),
    'access callback' => 'brightcove_field_browse_access',
    'access arguments' => array(
      'browse playlists',
      3,
      4,
      5,
    ),
    'file' => 'brightcove_field.browse.inc',
    'type' => MENU_CALLBACK,
  );

  // bc object type, entity type, field name, entity id or bundle
  $items['brightcove_field/browse/video/%/%'] = array(
    'title' => 'Brightcove Videos Browser',
    'page arguments' => array(
      2,
    ),
    'page callback' => 'brightcove_field_browse',
    'delivery callback' => 'brightcove_field_deliver_dialog',
    'access callback' => 'brightcove_field_browse_access',
    'access arguments' => array(
      'browse videos',
      3,
      4,
      5,
    ),
    'file' => 'brightcove_field.browse.inc',
    'type' => MENU_CALLBACK,
  );

  // bc object type, entity type, field name, entity id or bundle
  $items['brightcove_field/browse/playlist/%/%'] = array(
    'title' => 'Brightcove Videos Browser',
    'page arguments' => array(
      2,
    ),
    'page callback' => 'brightcove_field_browse',
    'delivery callback' => 'brightcove_field_deliver_dialog',
    'access callback' => 'brightcove_field_browse_access',
    'access arguments' => array(
      'browse playlists',
      3,
      4,
      5,
    ),
    'file' => 'brightcove_field.browse.inc',
    'type' => MENU_CALLBACK,
  );

  // entity type, field name, entity id or bundle
  $items['brightcove_field/upload/video/%/%'] = array(
    'title' => 'Upload video to Brightcove',
    'page callback' => 'brightcove_field_upload',
    'delivery callback' => 'brightcove_field_deliver_dialog',
    'access callback' => 'brightcove_field_browse_access',
    'access arguments' => array(
      'upload videos',
      3,
      4,
      5,
    ),
    'file' => 'brightcove_field.browse.inc',
    'type' => MENU_CALLBACK,
  );

  // entity type, field name, entity id or bundle
  $items['brightcove_field/upload/playlist/%/%'] = array(
    'title' => 'Upload playlist to Brightcove',
    'page callback' => 'brightcove_field_create',
    'delivery callback' => 'brightcove_field_deliver_dialog',
    'access callback' => 'brightcove_field_browse_access',
    'access arguments' => array(
      'administer brightcove playlists',
      3,
      4,
      5,
    ),
    'file' => 'brightcove_field.browse.inc',
    'type' => MENU_CALLBACK,
  );

  // entity type, entity id, field name, delta
  $items['brightcove_field_player/%/%/%/%/%'] = array(
    'title' => 'Brightcove Videos Window Player',
    'page callback' => 'brightcove_field_player',
    'page arguments' => array(
      1,
      2,
      3,
      4,
      5,
    ),
    'access callback' => 'brightcove_field_view_access',
    'access arguments' => array(
      2,
      3,
      4,
    ),
    'delivery callback' => 'brightcove_field_deliver_dialog',
    'type' => MENU_CALLBACK,
  );

  // width, height, entity_type, entity_id, field_name, delta
  $items['brightcove_dialog/ajax/%/%/%/%/%/%/%'] = array(
    'title' => '',
    'page callback' => 'brightcove_field_open_dialog',
    'page arguments' => array(
      2,
      3,
      4,
      5,
      6,
      7,
      8,
    ),
    'access callback' => 'brightcove_field_view_access',
    'access arguments' => array(
      5,
      6,
      7,
    ),
    'delivery callback' => 'ajax_deliver',
    'type' => MENU_CALLBACK,
  );
  return $items;
}