function RestPermissions::permissions
Same name in other branches
- 9 core/modules/rest/src/RestPermissions.php \Drupal\rest\RestPermissions::permissions()
- 10 core/modules/rest/src/RestPermissions.php \Drupal\rest\RestPermissions::permissions()
- 11.x core/modules/rest/src/RestPermissions.php \Drupal\rest\RestPermissions::permissions()
Returns an array of REST permissions.
Return value
array
1 string reference to 'RestPermissions::permissions'
- rest.permissions.yml in core/
modules/ rest/ rest.permissions.yml - core/modules/rest/rest.permissions.yml
File
-
core/
modules/ rest/ src/ RestPermissions.php, line 54
Class
- RestPermissions
- Provides rest module permissions.
Namespace
Drupal\restCode
public function permissions() {
$permissions = [];
/** @var \Drupal\rest\RestResourceConfigInterface[] $resource_configs */
$resource_configs = $this->resourceConfigStorage
->loadMultiple();
foreach ($resource_configs as $resource_config) {
$plugin = $resource_config->getResourcePlugin();
$permissions = array_merge($permissions, $plugin->permissions());
}
return $permissions;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.