function hook_juicebox_xml_class_alter in Juicebox HTML5 Responsive Image Galleries 7.2
Allow modules to alter the class used for a Juicebox XML loader.
Any Drupal formatter that creates Juicebox embed code must also provide a way for the associated Juicebox XML to be generated. This is typically handled via a seperate request that can be routed and managed any way you like (such as a dedicated Drupal menu item). If you want to use the existing "juicebox/xml/%" menu item for this, you can specifiy a custom XML loader class (implementing JuiceboxXmlInterface) and then "register" it with this hook.
Parameters
string $xml_loader_class: The Juicebox XML loader class that should be instantiated given the passed URL args.
array $args: The args that appear after /juicebox/xml in the path.
See also
1 invocation of hook_juicebox_xml_class_alter()
- juicebox_page_xml in ./
juicebox.module - Menu callback: generate Juicebox XML.
File
- ./
juicebox.api.php, line 94 - Hooks provided by the Juicebox module.
Code
function hook_juicebox_xml_class_alter(&$xml_loader_class, $args) {
if (!empty($args[0]) && $args[0] == 'mywidget') {
$xml_loader_class = 'JuiceboxXmlMyWidget';
}
}