protected function EntityPublishedInterfaceLinkProvider::__construct in JSON:API Hypermedia 8
Constructs a \Drupal\Component\Plugin\PluginBase 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.
Overrides PluginBase::__construct
File
- examples/
Plugin/ jsonapi_hypermedia/ LinkProvider/ EntityPublishedInterfaceLinkProvider.php, line 47
Class
- EntityPublishedInterfaceLinkProvider
- Class EntityPublishedInterfaceLinkProvider.
Namespace
Drupal\jsonapi_hypermedia\Plugin\jsonapi_hypermedia\LinkProviderCode
protected function __construct(array $configuration, string $plugin_id, mixed $plugin_definition) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
assert(!empty($configuration['status_field_name']) && is_string($configuration['status_field_name']), "The status_field_name configuration value is required.");
$this->statusFieldName = $configuration['status_field_name'];
}