function views_php_handler_filter::options_form in Views PHP 6
Same name and namespace in other branches
- 7.2 plugins/views/views_php_handler_filter.inc \views_php_handler_filter::options_form()
- 7 plugins/views/views_php_handler_filter.inc \views_php_handler_filter::options_form()
Implements views_handler#option_definition().
File
- plugins/
views/ views_php_handler_filter.inc, line 39
Class
- views_php_handler_filter
- A handler to filter a view using PHP defined by the administrator.
Code
function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);
$form += views_php_form_element($this, FALSE, array(
'sql_filter',
t('SQL filter code'),
t('Return a valid SQL WHERE clause.'),
FALSE,
), array(
'$view',
'$handler',
));
$form += views_php_form_element($this, array(
'use_php_setup',
t('Use setup code'),
t('If checked, you can provide PHP code to be run once right before execution of the view. This may be useful to define functions to be re-used in the value and/or output code.'),
), array(
'php_setup',
t('Setup code'),
t('Code to run right before execution of the view.'),
FALSE,
), array(
'$view',
'$handler',
'$static',
));
$form += views_php_form_element($this, FALSE, array(
'php_filter',
t('Filter code'),
t('If the code returns TRUE the current row is removed from the results.'),
FALSE,
), array(
'$view',
'$handler',
'$static',
'$row',
'$data',
));
}