function SaveEntity::execute

Same name in other branches
  1. 9 core/modules/system/tests/modules/action_test/src/Plugin/Action/SaveEntity.php \Drupal\action_test\Plugin\Action\SaveEntity::execute()
  2. 8.9.x core/modules/system/tests/modules/action_test/src/Plugin/Action/SaveEntity.php \Drupal\action_test\Plugin\Action\SaveEntity::execute()
  3. 10 core/modules/system/tests/modules/action_test/src/Plugin/Action/SaveEntity.php \Drupal\action_test\Plugin\Action\SaveEntity::execute()

Overrides ExecutableInterface::execute

File

core/modules/system/tests/modules/action_test/src/Plugin/Action/SaveEntity.php, line 25

Class

SaveEntity
Provides an operation to save user entities.

Namespace

Drupal\action_test\Plugin\Action

Code

public function execute($entity = NULL) {
    $entity->save();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.