1 views_plugin_argument_default_php.inc views_plugin_argument_default_php::options_form(&$form, &$form_state)

Provide the default form for setting options.

Overrides views_plugin_argument_default::options_form


core/modules/views/plugins/views_plugin_argument_default_php.inc, line 20
Contains the php code argument default plugin.


Default argument plugin to provide a PHP code block.


function options_form(&$form, &$form_state) {
  parent::options_form($form, $form_state);
  $form['code'] = array(
    '#type' => 'textarea',
    '#title' => t('PHP contextual filter code'),
    '#default_value' => $this->options['code'],
    '#description' => t('Enter PHP code that returns a value to use for this filter. Do not use <?php ?>. You must return only a single value for just this filter. Some variables are available: the view object will be "$view". The argument handler will be "$argument", for example you may change the title used for substitutions for this argument by setting "argument->validated_title"".'),

  // Only do this if using one simple standard form gadget
  $this->check_access($form, 'code');