You are here

class LocalActionAccessCheck in Search API Multilingual Solr Search 8

Checks access for displaying Solr configuration generator actions.

Hierarchy

Expanded class hierarchy of LocalActionAccessCheck

1 string reference to 'LocalActionAccessCheck'
search_api_solr_multilingual.services.yml in ./search_api_solr_multilingual.services.yml
search_api_solr_multilingual.services.yml
1 service uses LocalActionAccessCheck
search_api_solr_multilingual.local_action_access_check in ./search_api_solr_multilingual.services.yml
Drupal\search_api_solr_multilingual\Access\LocalActionAccessCheck

File

src/Access/LocalActionAccessCheck.php, line 14

Namespace

Drupal\search_api_solr_multilingual\Access
View source
class LocalActionAccessCheck implements AccessInterface {

  /**
   * A custom access check.
   *
   * @param \Drupal\Core\Session\AccountInterface $account
   *   Run access checks for this account.
   */
  public function access(AccountInterface $account, ServerInterface $search_api_server = NULL) {
    if ($search_api_server && $search_api_server
      ->getBackend() instanceof AbstractSearchApiSolrMultilingualBackend) {
      return AccessResult::allowed();
    }
    return AccessResult::forbidden();
  }

}

Members

Namesort descending Modifiers Type Description Overrides
LocalActionAccessCheck::access public function A custom access check.