public function ResourceInterface::permissions in Drupal 10
Same name and namespace in other branches
- 8 core/modules/rest/src/Plugin/ResourceInterface.php \Drupal\rest\Plugin\ResourceInterface::permissions()
- 9 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();