function scald_types in Scald: Media Management made easy 7
Get the available Scald Unified Types.
This function determines and returns a structured array specifying all the currently provided Scald Unified Types. The Scald Unified Types array has the following format: array( 'type-slug' => array( 'title' => 'Plain-text title', 'providers' => array( 'provider', ... ), ... );
Parameters
bool $reset: Whether or not to reset the static cache. Defaults to FALSE.
Return value
array The Scald Unified Types array
27 calls to scald_types()
- atom_reference_field_instance_settings_form in modules/
fields/ atom_reference/ atom_reference.module - Implements hook_field_instance_settings_form().
- atom_reference_field_referenceable_types in modules/
fields/ atom_reference/ atom_reference.module - Atom types that are allowed to be referenced in that field instance.
- atom_reference_field_widget_form in modules/
fields/ atom_reference/ atom_reference.module - Implements hook_field_widget_form.
- dnd_scald_wysiwyg_context_list in modules/
library/ dnd/ dnd.module - Get the list of Scald contexts that can be used in a WYSIWYG, keyed by type.
- ScaldAtomController::addType in includes/
ScaldAtomController.inc - Add a Scald unified type.
1 string reference to 'scald_types'
- scald_i18n_object_info in ./
scald.module - Implements hook_i18n_object_info().
File
- ./
scald.module, line 47 - The Scald Core, which handles all Scald Registries and dispatch.
Code
function scald_types($reset = FALSE) {
$types =& drupal_static(__FUNCTION__);
if ($reset || empty($types)) {
$types = db_select('scald_types', 's')
->fields('s', array(
'type',
'title',
'description',
'provider',
))
->execute()
->fetchAllAssoc('type');
}
return $types;
}