You are here

function context_condition_menu::condition_form_submit in Context 6.3

Same name and namespace in other branches
  1. 6 plugins/context_condition_menu.inc \context_condition_menu::condition_form_submit()
  2. 7.3 plugins/context_condition_menu.inc \context_condition_menu::condition_form_submit()

Override of condition_form_submit(). Trim any identifier padding for non-unique path menu items.

Overrides context_condition::condition_form_submit

File

plugins/context_condition_menu.inc, line 49

Class

context_condition_menu
Expose menu items as a context condition.

Code

function condition_form_submit($values) {

  // Trim any identifier padding for non-unique path menu items.
  $values = parent::condition_form_submit($values);
  $trimmed = array();
  foreach ($values as $key => $value) {
    $trimmed[trim($key, "'")] = trim($value, "'");
  }
  return $trimmed;
}