You are here

public function ResourceBase::__construct in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/rest/src/Plugin/ResourceBase.php \Drupal\rest\Plugin\ResourceBase::__construct()
  2. 10 core/modules/rest/src/Plugin/ResourceBase.php \Drupal\rest\Plugin\ResourceBase::__construct()

Constructs a Drupal\rest\Plugin\ResourceBase object.

Parameters

array $configuration: A configuration array containing information about the plugin instance.

string $plugin_id: The plugin_id for the plugin instance.

mixed $plugin_definition: The plugin implementation definition.

array $serializer_formats: The available serialization formats.

\Psr\Log\LoggerInterface $logger: A logger instance.

Overrides PluginBase::__construct

3 calls to ResourceBase::__construct()
EntityResource::__construct in core/modules/rest/src/Plugin/rest/resource/EntityResource.php
Constructs a Drupal\rest\Plugin\rest\resource\EntityResource object.
FileUploadResource::__construct in core/modules/file/src/Plugin/rest/resource/FileUploadResource.php
Constructs a FileUploadResource instance.
UserRegistrationResource::__construct in core/modules/user/src/Plugin/rest/resource/UserRegistrationResource.php
Constructs a new UserRegistrationResource instance.
3 methods override ResourceBase::__construct()
EntityResource::__construct in core/modules/rest/src/Plugin/rest/resource/EntityResource.php
Constructs a Drupal\rest\Plugin\rest\resource\EntityResource object.
FileUploadResource::__construct in core/modules/file/src/Plugin/rest/resource/FileUploadResource.php
Constructs a FileUploadResource instance.
UserRegistrationResource::__construct in core/modules/user/src/Plugin/rest/resource/UserRegistrationResource.php
Constructs a new UserRegistrationResource instance.

File

core/modules/rest/src/Plugin/ResourceBase.php, line 58

Class

ResourceBase
Common base class for resource plugins.

Namespace

Drupal\rest\Plugin

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, array $serializer_formats, LoggerInterface $logger) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->serializerFormats = $serializer_formats;
  $this->logger = $logger;
}