public function ViewsPhp::buildOptionsForm in Views PHP 8
Same name in this branch
- 8 src/Plugin/views/area/ViewsPhp.php \Drupal\views_php\Plugin\views\area\ViewsPhp::buildOptionsForm()
- 8 src/Plugin/views/filter/ViewsPhp.php \Drupal\views_php\Plugin\views\filter\ViewsPhp::buildOptionsForm()
- 8 src/Plugin/views/sort/ViewsPhp.php \Drupal\views_php\Plugin\views\sort\ViewsPhp::buildOptionsForm()
- 8 src/Plugin/views/access/ViewsPhp.php \Drupal\views_php\Plugin\views\access\ViewsPhp::buildOptionsForm()
- 8 src/Plugin/views/cache/ViewsPhp.php \Drupal\views_php\Plugin\views\cache\ViewsPhp::buildOptionsForm()
- 8 src/Plugin/views/field/ViewsPhp.php \Drupal\views_php\Plugin\views\field\ViewsPhp::buildOptionsForm()
Provide a form to edit options for this plugin.
Overrides PluginBase::buildOptionsForm
File
- src/
Plugin/ views/ access/ ViewsPhp.php, line 53 - Definition of Drupal\views_php\Plugin\views\access\ViewsPhp.
Class
- ViewsPhp
- Access plugin that provides access based on PHP code.
Namespace
Drupal\views_php\Plugin\views\accessCode
public function buildOptionsForm(&$form, FormStateInterface $form_state) {
parent::buildOptionsForm($form, $form_state);
$form += views_php_form_element($this, FALSE, array(
'php_access',
t('Access code'),
t('If the code returns TRUE the requesting user is granted access to the view.'),
FALSE,
), array(
'$view_name' => t('The name of the view to check.'),
'$display_id' => t('The ID of the display to check.'),
'$account' => t('The account to check.'),
));
$form['#attached']['library'][] = 'views_php/drupal.views_php';
}