public function views_plugin_argument_default_php::options_form in Views (for Drupal 7) 7.3
Same name and namespace in other branches
- 6.3 plugins/views_plugin_argument_default_php.inc \views_plugin_argument_default_php::options_form()
Provide the default form for setting options.
Overrides views_plugin_argument_default::options_form
File
- plugins/
views_plugin_argument_default_php.inc, line 28 - Definition of views_plugin_argument_default_php.
Class
- views_plugin_argument_default_php
- Default argument plugin to provide a PHP code block.
Code
public 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');
}