You are here

public function WebformSubmissionUnstickyAction::execute in Webform 8.5

Same name and namespace in other branches
  1. 6.x src/Plugin/Action/WebformSubmissionUnstickyAction.php \Drupal\webform\Plugin\Action\WebformSubmissionUnstickyAction::execute()

Executes the plugin.

Overrides ExecutableInterface::execute

File

src/Plugin/Action/WebformSubmissionUnstickyAction.php, line 22

Class

WebformSubmissionUnstickyAction
Makes a webform submission unsticky.

Namespace

Drupal\webform\Plugin\Action

Code

public function execute($entity = NULL) {

  /** @var \Drupal\webform\WebformSubmissionInterface $entity */
  $entity
    ->setSticky(FALSE)
    ->save();
}