class LocalActionAccessCheck in Apache Solr Multilingual 8
Checks access for displaying configuration translation page.
Hierarchy
- class \Drupal\apachesolr_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 18 - Contains \Drupal\example\Access\CustomAccessCheck.
Namespace
Drupal\apachesolr_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 SearchApiSolrMultilingualBackend) {
return AccessResult::allowed();
}
return AccessResult::forbidden();
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
LocalActionAccessCheck:: |
public | function | A custom access check. |