function views_plugin_argument_default_php::argument_form
2.x views_plugin_argument_default_php.inc | views_plugin_argument_default_php::argument_form(&$form, &$form_state) |
Overrides views_plugin_argument_default::argument_form
File
- plugins/
views_plugin_argument_default_php.inc, line 13 - Contains the php code argument default plugin.
Class
- views_plugin_argument_default_php
- Default argument plugin to provide a PHP code block.
Code
function argument_form(&$form, &$form_state) {
$form[$this->option_name] = array(
'#type' => 'textarea',
'#title' => t('PHP argument code'),
'#default_value' => $this->get_argument(TRUE), // the true forces it raw.
'#process' => array('views_process_dependency'),
'#description' => t('Enter PHP code that returns a value to use for this argument. Do not use <?php ?>. You must return only a single value for just this argument.'),
'#dependency' => array(
'radio:options[default_action]' => array('default'),
'radio:options[default_argument_type]' => array($this->id)
),
'#dependency_count' => 2,
);
$this->check_access($form);
}