You are here

function scald_scald_provider in Scald: Media Management made easy 6

Implementation of hook_scald_provider().

File

./scald.module, line 2360

Code

function scald_scald_provider() {
  return array(
    'types' => array(
      'composite' => array(
        'title' => t('Scald Composite'),
        'description' => t('A Scald Atom which includes other Atoms.'),
      ),
      'audio' => array(
        'title' => t('Audio'),
        'description' => t('Audio Content.'),
      ),
      'image' => array(
        'title' => t('Image'),
        'description' => t('Graphics and Photos.'),
      ),
      'video' => array(
        'title' => t('Video'),
        'description' => t('Moving Pictures!'),
      ),
    ),
    'contexts' => array(
      'no-access' => array(
        'title' => t('No Access'),
        'description' => t('Built-in Context used when an Atom cannot be viewed by the current User.'),
        'render_language' => 'XHTML',
        'parseable' => TRUE,
        'formats' => array(),
      ),
      'invalid-id' => array(
        'title' => t('Invalid ID'),
        'description' => t('Built-in Context used when an Invalid Scald ID is provided to the rendering stack.'),
        'render_language' => 'XHTML',
        'parseable' => TRUE,
        'formats' => array(),
      ),
      'deleted' => array(
        'title' => t('Deleted'),
        'description' => t('Built-in Context used when an Atom is no longer present in the Registry (but once was).'),
        'render_language' => 'XHTML',
        'parseable' => TRUE,
        'formats' => array(),
      ),
      'title' => array(
        'title' => t('Title'),
        'description' => t('Literally *just* the title as plain text, though the language is specified as XHTML for simplicity.'),
        'render_language' => 'XHTML',
        'parseable' => FALSE,
        'formats' => array(),
      ),
    ),
    /**
     * The "passthrough" transcoder is hard-coded into Scald Core, but the Provider
     *  registration array would look something like this.
     *
     *  'transcoders'   => array(
     *    'passthrough' => array(
     *      'title'       => t('Passthrough'),
     *      'description' => t('<see scald.admin.inc>'),
     *      'formats'     => array(
     *        'type-a' => 'passthrough',
     *        'type-b' => 'passthrough',
     *        // All currently-registered Scald Unified Types would be listed
     *      ),
     *    ),
     *  )
     */
    'relationships' => array(
      'includes' => array(
        'title' => t('includes'),
        'title_reverse' => t('is included by'),
        'description' => t('The relationship that results when a Scald Atom is included in a Scald Composite'),
      ),
    ),
    'actions' => array(
      /**
       * The "fetch" action is hard-coded into Scald Core, but this is what the
       *  Provider registration array would look like.  "Fetch" occupies the lowest
       *  bit in the Scald Actions bitstring -- exponent 0.  Similarly, the '@admin'
       *  pseudo-action (it's actually a mode for an Actions bitstring) occupies the
       *  highest bit in the Scald Actions bitstring but is hardcoded.
       *
       *    'fetch' => array(
       *      'title'       => t('Fetch'),
       *      'description' => t('<see scald.admin.inc>'),
       *    ),
       *    // @admin is *always* the highest bit
       *    '@admin' => Array(
       *      'title'       => t('Admin Mode'),
       *      'description' => t('<see scald.admin.inc>'),
       *    ),
       */
      'edit' => array(
        'title' => t('Edit'),
        'description' => t('Edit the details of a Scald Atom'),
      ),
      'view' => array(
        'title' => t('View'),
        'description' => t('View a Scald Atom on-site'),
      ),
      'delete' => array(
        'title' => t('Delete'),
        'description' => t('Delete (unregister) a Scald Atom'),
      ),
    ),
  );
}