public function DynamicTest::access in Views (for Drupal 7) 8.3
Determine if the current user has access or not.
Parameters
Drupal\user\User $account: The user who wants to access this view.
Return value
TRUE Returns whether the user has access to the view.
Overrides AccessPluginBase::access
File
- tests/
views_test_data/ lib/ Drupal/ views_test_data/ Plugin/ views/ access/ DynamicTest.php, line 32 - Definition of Drupal\views_test_data\Plugin\views\access\DynamicTest.
Class
- DynamicTest
- Tests a dynamic access plugin.
Namespace
Drupal\views_test_data\Plugin\views\accessCode
public function access($account) {
return !empty($this->options['access']) && isset($this->view->args[0]) && $this->view->args[0] == variable_get('test_dynamic_access_argument1', NULL) && isset($this->view->args[1]) && $this->view->args[1] == variable_get('test_dynamic_access_argument2', NULL);
}