protected function spaces_controller_context::load_space_values in Spaces 7
Same name and namespace in other branches
- 6.3 plugins/spaces_controller_context.inc \spaces_controller_context::load_space_values()
- 7.3 plugins/spaces_controller_context.inc \spaces_controller_context::load_space_values()
Override of load_space_values().
All overrides are retrieved at once for a given space to reduce the number of queries run when a space is active.
Overrides spaces_controller::load_space_values
File
- plugins/
spaces_controller_context.inc, line 45
Class
- spaces_controller_context
- Context controller.
Code
protected function load_space_values($id = NULL) {
if (!$this->loaded_all['space']) {
$result = db_query("\n SELECT object_id AS id, value\n FROM {spaces_overrides}\n WHERE type = :type\n AND id = :id\n AND object_type = :otype", array(
':type' => $this->space_type,
':id' => $this->space_id,
':otype' => $this->controller,
));
foreach ($result as $row) {
$this->values['space'][$row->id] = unserialize($row->value);
}
$this->loaded_all['space'] = TRUE;
}
}