function scald_gallery_install in Scald: Gallery 7
Same name and namespace in other branches
- 7.2 scald_gallery.install \scald_gallery_install()
Implements hook_install().
File
- ./
scald_gallery.install, line 12 - Scald Gallery Installation.
Code
function scald_gallery_install() {
scald_add_type('gallery', 'Gallery', 'Gallery');
// Associate the gallery atom type to the "library" image style
// in the library context.
$context_config = scald_context_config_load('sdl_library_item');
$context_config->transcoder['gallery']['*'] = 'style-Library';
scald_context_config_save($context_config);
// Associate the gallery atom type to the "galleria" player
// in the full-page context.
$context_config = scald_context_config_load('full');
$context_config->player['gallery']['*'] = 'galleria';
scald_context_config_save($context_config);
// Create fields and instances.
foreach (scald_gallery_installed_fields() as $field) {
field_create_field($field);
}
foreach (scald_gallery_installed_instances() as $instance) {
field_create_instance($instance);
}
}