public function SolrConfigForm::access in Search API Solr 4.x
Same name and namespace in other branches
- 8.3 src/Form/SolrConfigForm.php \Drupal\search_api_solr\Form\SolrConfigForm::access()
- 8 src/Form/SolrConfigForm.php \Drupal\search_api_solr\Form\SolrConfigForm::access()
- 8.2 src/Form/SolrConfigForm.php \Drupal\search_api_solr\Form\SolrConfigForm::access()
Checks access for the Solr config form.
Parameters
\Drupal\search_api\ServerInterface $search_api_server: The server for which access should be tested.
Return value
\Drupal\Core\Access\AccessResultInterface The access result.
Throws
\Drupal\search_api\SearchApiException
1 string reference to 'SolrConfigForm::access'
File
- src/
Form/ SolrConfigForm.php, line 126
Class
- SolrConfigForm
- A basic form with a passed entity with an interface.
Namespace
Drupal\search_api_solr\FormCode
public function access(ServerInterface $search_api_server) {
return AccessResult::allowedIf($search_api_server
->hasValidBackend() && $search_api_server
->getBackend() instanceof SearchApiSolrBackend)
->addCacheableDependency($search_api_server);
}