You are here

public function HelpSearch::access in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/help_topics/src/Plugin/Search/HelpSearch.php \Drupal\help_topics\Plugin\Search\HelpSearch::access()
  2. 9 core/modules/help_topics/src/Plugin/Search/HelpSearch.php \Drupal\help_topics\Plugin\Search\HelpSearch::access()

File

core/modules/help_topics/src/Plugin/Search/HelpSearch.php, line 162

Class

HelpSearch
Handles searching for help using the Search module index.

Namespace

Drupal\help_topics\Plugin\Search

Code

public function access($operation = 'view', AccountInterface $account = NULL, $return_as_object = FALSE) {
  $result = AccessResult::allowedIfHasPermission($account, 'access administration pages');
  return $return_as_object ? $result : $result
    ->isAllowed();
}