5 use Drupal\Core\Config\Entity\ConfigEntityInterface;
6 use Drupal\Core\Entity\EntityWithPluginCollectionInterface;
9 * Defines a configuration entity to store enabled REST resources.
11 interface RestResourceConfigInterface extends ConfigEntityInterface, EntityWithPluginCollectionInterface {
14 * Granularity value for per-method configuration.
16 const METHOD_GRANULARITY = 'method';
19 * Granularity value for per-resource configuration.
21 const RESOURCE_GRANULARITY = 'resource';
24 * Retrieves the REST resource plugin.
26 * @return \Drupal\rest\Plugin\ResourceInterface
29 public function getResourcePlugin();
32 * Retrieves a list of supported HTTP methods.
35 * A list of supported HTTP methods.
37 public function getMethods();
40 * Retrieves a list of supported authentication providers.
42 * @param string $method
43 * The request method e.g GET or POST.
46 * A list of supported authentication provider IDs.
48 public function getAuthenticationProviders($method);
51 * Retrieves a list of supported response formats.
53 * @param string $method
54 * The request method e.g GET or POST.
57 * A list of supported format IDs.
59 public function getFormats($method);