protected function spaces_controller_variable::load_preset_values in Spaces 6.3
Same name and namespace in other branches
- 7.3 plugins/spaces_controller_variable.inc \spaces_controller_variable::load_preset_values()
- 7 plugins/spaces_controller_variable.inc \spaces_controller_variable::load_preset_values()
Override of load_preset_values(). We cannot rely on variable_get() -- we must first check our space override values.
Overrides spaces_controller::load_preset_values
1 call to spaces_controller_variable::load_preset_values()
- spaces_controller_variable::init_overrides in plugins/
spaces_controller_variable.inc - Override of init_overrides().
File
- plugins/
spaces_controller_variable.inc, line 39
Class
- spaces_controller_variable
- Variable controller.
Code
protected function load_preset_values($id = NULL) {
if (empty($this->loaded_all['preset'])) {
$preset_name = $this
->get("spaces_preset_{$this->space_type}", 'space') ? $this
->get("spaces_preset_{$this->space_type}", 'space') : variable_get("spaces_preset_{$this->space_type}", NULL);
if ($preset_name && ($preset = spaces_preset_load($preset_name))) {
if (isset($preset->value[$this->controller])) {
$this->values['preset'] = $preset->value[$this->controller];
}
}
$this->loaded_all['preset'] = TRUE;
}
}