You are here

function context_condition_path::condition_form_submit in Context 6

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

Condition form submit handler.

Overrides context_condition::condition_form_submit

File

plugins/context_condition_path.inc, line 29

Class

context_condition_path
Expose paths as a context condition.

Code

function condition_form_submit($values) {
  $parsed = array();
  $items = explode("\n", $values);
  if (!empty($items)) {
    foreach ($items as $v) {
      $v = trim($v);
      if (!empty($v)) {
        $parsed[$v] = $v;
      }
    }
  }
  return $parsed;
}