You are here

public function EntityCreate::__construct in Rules 8.3

Constructs an EntityCreate 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.

\Drupal\Core\Entity\EntityStorageInterface $storage: The entity storage service.

Overrides ContextAwarePluginBase::__construct

File

src/Plugin/RulesAction/EntityCreate.php, line 55

Class

EntityCreate
Provides a generic 'Create a new entity' action.

Namespace

Drupal\rules\Plugin\RulesAction

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityStorageInterface $storage) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->storage = $storage;
  $this->entityTypeId = $plugin_definition['entity_type_id'];
  $this->bundleKey = $plugin_definition['bundle_key'];
}