You are here

protected function spaces_controller_context::plugin_values in Spaces 6.3

Same name and namespace in other branches
  1. 7.3 plugins/spaces_controller_context.inc \spaces_controller_context::plugin_values()
  2. 7 plugins/spaces_controller_context.inc \spaces_controller_context::plugin_values()

Split the single context object into array of individual plugin values.

1 call to spaces_controller_context::plugin_values()
spaces_controller_context::load_original_values in plugins/spaces_controller_context.inc
Override of load_original_values().

File

plugins/spaces_controller_context.inc, line 23

Class

spaces_controller_context
Context controller.

Code

protected function plugin_values($context) {
  $keys = array(
    'conditions',
    'reactions',
  );
  $plugins = array();
  if (!empty($context->conditions)) {
    foreach ($context->conditions as $plugin => $values) {
      $plugins["{$context->name}:condition:{$plugin}"] = $values;
    }
  }
  if (!empty($context->reactions)) {
    foreach ($context->reactions as $plugin => $values) {
      $plugins["{$context->name}:reaction:{$plugin}"] = $values;
    }
  }
  return $plugins;
}