public function Permissions::bySearch in Search API Autocomplete 8
Returns a list of permissions, one per configured search.
Return value
array[] A list of permission definitions, keyed by permission machine name.
1 string reference to 'Permissions::bySearch'
File
- src/
Permissions.php, line 49
Class
- Permissions
- Provides permissions of the search_api_autocomplete module.
Namespace
Drupal\search_api_autocompleteCode
public function bySearch() {
$perms = [];
/** @var \Drupal\search_api_autocomplete\SearchInterface $search */
foreach ($this->storage
->loadMultiple() as $id => $search) {
$perms['use search_api_autocomplete for ' . $id] = [
'title' => $this
->t('Use autocomplete for the %search search', [
'%search' => $search
->label(),
]),
];
}
return $perms;
}