You are here

public function JSONFieldEnhancer::__construct in JSON:API Extras 8.3

Same name and namespace in other branches
  1. 8.2 src/Plugin/jsonapi/FieldEnhancer/JSONFieldEnhancer.php \Drupal\jsonapi_extras\Plugin\jsonapi\FieldEnhancer\JSONFieldEnhancer::__construct()

Constructs a new JSONFieldEnhancer.

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.

\Drupal\Component\Serialization\Json $encoder: The serialization json.

Overrides PluginBase::__construct

File

src/Plugin/jsonapi/FieldEnhancer/JSONFieldEnhancer.php, line 41

Class

JSONFieldEnhancer
Perform additional manipulations to JSON fields.

Namespace

Drupal\jsonapi_extras\Plugin\jsonapi\FieldEnhancer

Code

public function __construct(array $configuration, string $plugin_id, $plugin_definition, Json $encoder) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->encoder = $encoder;
}