Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. HelpSearch.php

function HelpSearch::access

Overrides AccessibleInterface::access

File

core/modules/help/src/Plugin/Search/HelpSearch.php, line 161

Class

HelpSearch
Handles searching for help using the Search module index.

Namespace

Drupal\help\Plugin\Search

Code

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