You are here

public function StaticTest::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/StaticTest.php, line 32
Definition of Drupal\views_test_data\Plugin\views\access\StaticTest.

Class

StaticTest
Tests a static access plugin.

Namespace

Drupal\views_test_data\Plugin\views\access

Code

public function access($account) {
  return !empty($this->options['access']);
}