You are here

public function views_php_handler_filter::options_form in Views PHP 7

Same name and namespace in other branches
  1. 6 plugins/views/views_php_handler_filter.inc \views_php_handler_filter::options_form()
  2. 7.2 plugins/views/views_php_handler_filter.inc \views_php_handler_filter::options_form()

Implements views_handler#option_definition().

Overrides views_handler_filter::options_form

File

plugins/views/views_php_handler_filter.inc, line 40

Class

views_php_handler_filter
A handler to filter a view using PHP defined by the administrator.

Code

public function options_form(&$form, &$form_state) {
  parent::options_form($form, $form_state);
  $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',
  ));
}