protected function JuiceboxXmlViewsStyle::getJuiceboxFromData in Juicebox HTML5 Responsive Image Galleries 7.2
Helper to get a Juicebox gallery from a view.
Parameters
array $field: An view object to extract a gallery object from.
Return value
boolean Returns a Juicebox gallery object if a gallery is both found a built. Return NULL if no gallery can be extracted.
1 call to JuiceboxXmlViewsStyle::getJuiceboxFromData()
- JuiceboxXmlViewsStyle::getXml in plugins/
JuiceboxXmlViewsStyle.inc - Get the XML based on loaded data.
File
- plugins/
JuiceboxXmlViewsStyle.inc, line 92 - Juicebox XML loader that's used to load (and build via loaded methods) the XML associated with a Drupal views style formatter plugin.
Class
- JuiceboxXmlViewsStyle
- Class to load and build the XML associated with a Drupal views style formatter plugin.
Code
protected function getJuiceboxFromData($view) {
// Within this context if the gallery has been initialized we know it has
// also been built (as both happen together within the formatter's render()
// method).
if (isset($view->style_plugin->juicebox) && $view->style_plugin->juicebox
->isInitialized()) {
return $view->style_plugin->juicebox;
}
return NULL;
}