class LocalActionAccessCheck in Search API Multilingual Solr Search 8
Checks access for displaying Solr configuration generator actions.
Hierarchy
- class \Drupal\search_api_solr_multilingual\Access\LocalActionAccessCheck implements AccessInterface
Expanded class hierarchy of LocalActionAccessCheck
1 string reference to 'LocalActionAccessCheck'
1 service uses LocalActionAccessCheck
File
- src/
Access/ LocalActionAccessCheck.php, line 14
Namespace
Drupal\search_api_solr_multilingual\AccessView 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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
LocalActionAccessCheck:: |
public | function | A custom access check. |