function atom_reference_field_referenceable_types in Scald: Media Management made easy 7
Atom types that are allowed to be referenced in that field instance.
2 calls to atom_reference_field_referenceable_types()
- atom_reference_field_validate in modules/
fields/ atom_reference/ atom_reference.module - Implements hook_field_validate().
- atom_reference_field_widget_form in modules/
fields/ atom_reference/ atom_reference.module - Implements hook_field_widget_form.
File
- modules/
fields/ atom_reference/ atom_reference.module, line 368 - Defines a new field type, allowing to directly reference Scald Atoms from a node.
Code
function atom_reference_field_referenceable_types($instance) {
$types = $instance['settings']['referencable_types'];
$all = scald_types();
// All types are allowed if no type is explicitely selected (default setting).
if (!array_filter($types)) {
$types = array_fill_keys(array_keys($all), '1');
}
return $types;
}