diff --git a/core/modules/views/tests/modules/views_test_data/src/Plugin/views/access/StaticTest.php b/core/modules/views/tests/modules/views_test_data/src/Plugin/views/access/StaticTest.php index d0fa62f..cac2cd8 100644 --- a/core/modules/views/tests/modules/views_test_data/src/Plugin/views/access/StaticTest.php +++ b/core/modules/views/tests/modules/views_test_data/src/Plugin/views/access/StaticTest.php @@ -7,6 +7,7 @@ namespace Drupal\views_test_data\Plugin\views\access; +use Drupal\Core\Access\AccessResult; use Drupal\Core\Session\AccountInterface; use Drupal\views\Plugin\views\access\AccessPluginBase; use Symfony\Component\Routing\Route; @@ -29,8 +30,12 @@ protected function defineOptions() { return $options; } - public function access(AccountInterface $account) { - return !empty($this->options['access']); + /** + * {@inheritdoc} + */ + public function access($operation, AccountInterface $account = NULL, $return_as_object = FALSE) { + $result = AccessResult::allowedIf(!empty($this->options['access'])); + return $return_as_object ? $result : $result->isAllowed(); } /**