Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "Save entity" derivative #419

Open
wants to merge 13 commits into
base: 8.x-3.x
Choose a base branch
from

Conversation

milkovsky
Copy link
Contributor

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'];
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure about this __construct()

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems ok?

Conflicts:
	src/Plugin/RulesAction/EntitySave.php
	tests/src/Integration/Action/EntityCreateTest.php
'context' => [
'entity' => ContextDefinition::create("entity:$entity_type_id")
->setLabel($entity_type->getLabel())
->setDescription($this->t('Specifies the entity, which should be saved permanently.'))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Specifies the entity, which should be saved permanently - should be improved to

Specifies the @entity-type-label that should be saved permanently.

@milkovsky
Copy link
Contributor Author

2 options:

  1. change tests to support the derived action
  2. add new action rules_entity_save

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants