You are here

function atom_reference_field_formatter_info in Scald: Media Management made easy 7

Same name and namespace in other branches
  1. 6 atom_reference/atom_reference.module \atom_reference_field_formatter_info()

Implements hook_field_formatter_info().

File

modules/fields/atom_reference/atom_reference.module, line 167
Defines a new field type, allowing to directly reference Scald Atoms from a node.

Code

function atom_reference_field_formatter_info() {

  // Expose all the Scald Contexts as formatters for the Atom Reference field.
  $formatters = array();
  $contexts = scald_contexts_public();
  foreach ($contexts as $name => $context) {
    $formatters[$name] = array(
      'label' => $context['title'],
      'field types' => array(
        'atom_reference',
      ),
      'settings' => array(
        'link' => 0,
        'override' => 0,
      ),
    );
  }
  return $formatters;
}