function scald_context_config_load in Scald: Media Management made easy 7
Load a context config.
Parameters
string $name: Context name.
10 calls to scald_context_config_load()
- dnd_library in modules/
library/ dnd/ dnd.module - Implements hook_library().
- scald_admin_contexts_form in includes/
scald.admin.inc - Form for admin settings for Scald Contexts.
- scald_admin_contexts_form_submit in includes/
scald.admin.inc - Submit handler for Scald Contexts admin settings form.
- scald_admin_context_confirm_delete_form_submit in includes/
scald.admin.inc - Process scald_admin_context_confirm_delete_form form submission.
- scald_context_type_features_rebuild in ./
scald.features.inc - Implements hook_features_rebuild().
File
- ./
scald.module, line 2416 - The Scald Core, which handles all Scald Registries and dispatch.
Code
function scald_context_config_load($name) {
ctools_include('export');
if (!($context_config = ctools_export_crud_load('scald_context_config', $name))) {
$context_config = ctools_export_new_object('scald_context_config');
$context_config->context = $name;
}
// Add default settings.
foreach (scald_types() as $type) {
if (!isset($context_config->transcoder[$type->type]['*'])) {
$context_config->transcoder[$type->type]['*'] = 'passthrough';
}
if (!isset($context_config->player[$type->type]['*'])) {
$context_config->player[$type->type]['*'] = 'default';
}
if (!isset($context_config->data)) {
$context_config->data = array();
}
}
return $context_config;
}