public static function boxes_box::load in Boxes 6
Same name and namespace in other branches
- 7 plugins/boxes_box.inc \boxes_box::load()
Load existing box by its unique identifier $delta.
1 call to boxes_box::load()
- boxes_load in ./
boxes.module - Load a box.
File
- plugins/
boxes_box.inc, line 22
Class
- boxes_box
- Abstract base class defining a box. A boxes content plugin provides a form of options for configuring content and renders content for display.
Code
public static function load($delta, $reset = false) {
if (!isset(self::$boxes[$delta]) || $reset) {
ctools_include('export');
$box = ctools_export_load_object('box', 'names', array(
$delta,
));
if (!empty($box) && ($values = array_pop($box))) {
self::$boxes[$delta] = self::factory($values->plugin_key, $values);
self::$boxes[$delta]->new = false;
}
}
return isset(self::$boxes[$delta]) ? self::$boxes[$delta] : NULL;
}