function ResourceInterface::permissions
Same name in other branches
- 9 core/modules/rest/src/Plugin/ResourceInterface.php \Drupal\rest\Plugin\ResourceInterface::permissions()
- 8.9.x core/modules/rest/src/Plugin/ResourceInterface.php \Drupal\rest\Plugin\ResourceInterface::permissions()
- 10 core/modules/rest/src/Plugin/ResourceInterface.php \Drupal\rest\Plugin\ResourceInterface::permissions()
Provides an array of permissions suitable for .permissions.yml files.
A resource plugin can define a set of user permissions that are used on the routes for this resource or for other purposes.
It is not required for a resource plugin to specify permissions: if they have their own access control mechanism, they can use that, and return the empty array.
Return value
array The permission array.
1 method overrides ResourceInterface::permissions()
- ResourceBase::permissions in core/
modules/ rest/ src/ Plugin/ ResourceBase.php - Implements ResourceInterface::permissions().
File
-
core/
modules/ rest/ src/ Plugin/ ResourceInterface.php, line 43
Class
- ResourceInterface
- Specifies the publicly available methods of a resource plugin.
Namespace
Drupal\rest\PluginCode
public function permissions();
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.