You are here

function context_error_context_condition_error::condition_form_submit in Context error 7

Condition form submit handler.

Convert the values to an array, otherwise only string is submitted. Store the 403 AND 404 case as an array with both values stored.

Overrides context_condition::condition_form_submit

File

plugins/context_error_context_conditions.inc, line 65
Context condition plugin to provide a trigger for 404 and 403 error pages.

Class

context_error_context_condition_error
Expose the 404 error page as the context condition.

Code

function condition_form_submit($values) {
  if ($values == CONTEXT_ERROR_403_404) {
    return array(
      CONTEXT_ERROR_403 => CONTEXT_ERROR_403,
      CONTEXT_ERROR_404 => CONTEXT_ERROR_404,
    );
  }
  return array(
    $values => $values,
  );
}