You are here

public function WSDecoderBase::__construct in Web Service Data 2.0.x

Same name and namespace in other branches
  1. 8 src/Plugin/WSDecoderBase.php \Drupal\wsdata\Plugin\WSDecoderBase::__construct()

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

src/Plugin/WSDecoderBase.php, line 56

Class

WSDecoderBase
Base class for Wsdecoder plugin plugins.

Namespace

Drupal\wsdata\Plugin

Code

public function __construct($data = NULL, &$entity = NULL, $lang = NULL) {
  $this->entity = $entity;
  if (isset($data) and $data) {
    $this
      ->addData($data, $lang);
  }
}