class spaces_controller_boxes in Boxes 6
Same name and namespace in other branches
- 7 plugins/spaces_controller_boxes.inc \spaces_controller_boxes
Spaces controller for boxes module.
Hierarchy
- class \spaces_controller
- class \spaces_controller_boxes
Expanded class hierarchy of spaces_controller_boxes
2 string references to 'spaces_controller_boxes'
- boxes_spaces_plugins in ./
boxes.module - Implementation of hook_spaces_plugins
- boxes_spaces_registry in ./
boxes.module - Implementation of hook_spaces_registry().
File
- plugins/
spaces_controller_boxes.inc, line 6
View source
class spaces_controller_boxes extends spaces_controller {
// Override of load_original_values
protected function load_original_values($id = NULL) {
if (empty($this->loaded_all['original'])) {
// TODO can we always rely on having export.inc loaded?
if (!isset($id)) {
$boxes = array();
foreach (ctools_export_load_object('box') as $box) {
$boxes[$box->delta] = $box;
}
$this->values['original'] = $boxes;
$this->loaded_all['original'] = TRUE;
}
else {
if (!isset($this->loaded['original'][$id])) {
if ($box = array_pop(ctools_export_load_object('box', 'names', array(
$id,
)))) {
$this->values['original'][$id] = $box;
$this->loaded['original'][$id] = TRUE;
}
}
}
}
}
/**
* Override of the set() method.
*
* Remove flags used by to detect state and transflorm to stdClass so that the
* box configuration can be loaded regardless of whether the plugin is
* available.
*/
function set($id, $value) {
unset($value->new);
unset($value->export_type);
$box = new stdClass();
foreach ($value as $k => $v) {
$box->{$k} = $v;
}
parent::set($id, $box);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
spaces_controller:: |
property | |||
spaces_controller:: |
protected | property | ||
spaces_controller:: |
protected | property | ||
spaces_controller:: |
property | |||
spaces_controller:: |
property | |||
spaces_controller:: |
property | |||
spaces_controller:: |
function | Delete a controller object override for this space. | ||
spaces_controller:: |
function | Get a value for this controller. | ||
spaces_controller:: |
function | Initialize overrides. Assume this controller is now active. This method is re-run when the caller wants to ensure the values provided by the controller are refreshed. | 1 | |
spaces_controller:: |
protected | function | Protected method that ensures a preset-level override for the provided object has been loaded. Since presets values are stored in aggregate, the $id argument here is largely for consistency. | 1 |
spaces_controller:: |
protected | function | Protected method that ensures a space-level override for the provided object has been loaded. | 1 |
spaces_controller:: |
protected | function | Wrapper around load_[environment]_values. | |
spaces_controller:: |
protected | function | Clear out loaded values. | |
spaces_controller:: |
function | Provide a readable display of an object override for administration. | ||
spaces_controller:: |
function | |||
spaces_controller_boxes:: |
protected | function |
Protected method for loading an original object.
Must be overridden by extending classes. Overrides spaces_controller:: |
|
spaces_controller_boxes:: |
function |
Override of the set() method. Overrides spaces_controller:: |