Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ResourceInterface.php

function 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\Plugin

Code

public function permissions();

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal