defaultAction example

// Since argument validator plugins can potentially transform the value,         // use whatever value the argument handler now has, not the raw value.         $substitutions["{{ raw_arguments.$id }}"] = strip_tags(Html::decodeEntities($argument->getValue()));

        // Test to see if we should use this argument's title         if (!empty($argument->options['title_enable']) && !empty($argument->options['title'])) {
          $title = $argument->options['title'];
        }
      }
      else {
        // determine default condition and handle.         $status = $argument->defaultAction();
        break;
      }

      // Be safe with references and loops:       unset($argument);
    }

    // set the title in the build info.     if (!empty($title)) {
      $this->build_info['title'] = $title;
    }

    

    else {
      return $this->{$info['method']}();
    }
  }

  /** * How to act if validation fails. */
  public function validateFail() {
    $info = $this->defaultActions($this->options['validate']['fail']);
    return $this->defaultAction($info);
  }

  /** * Default action: ignore. * * If an argument was expected and was not given, in this case, simply * ignore the argument entirely. */
  public function defaultIgnore() {
    return TRUE;
  }

  
Home | Imprint | This part of the site doesn't use cookies.