public function Php::access in PHP 8
Same name in this branch
- 8 src/Plugin/views/argument_default/Php.php \Drupal\php\Plugin\views\argument_default\Php::access()
- 8 src/Plugin/views/argument_validator/Php.php \Drupal\php\Plugin\views\argument_validator\Php::access()
Permission check.
Only let users with PHP block visibility permissions set/modify this validate plugin.
Overrides ArgumentValidatorPluginBase::access
File
- src/
Plugin/ views/ argument_validator/ Php.php, line 50
Class
- Php
- Provide PHP code to validate whether or not an argument is ok.
Namespace
Drupal\php\Plugin\views\argument_validatorCode
public function access() {
return \Drupal::currentUser()
->hasPermission('use PHP for settings');
}