You are here

public function MarkAsDone::execute in Log entity 8

Executes the plugin.

Overrides ExecutableInterface::execute

File

src/Plugin/Action/MarkAsDone.php, line 27
Contains \Drupal\log\Plugin\Action\MarkAsDone.

Class

MarkAsDone
Marks a log as done.

Namespace

Drupal\log\Plugin\Action

Code

public function execute($entity = NULL) {
  $entity
    ->get('done')
    ->setValue(TRUE);
  $entity
    ->save();
}