public function WebformSubmissionUnstickyAction::execute in Webform 8.5
Same name and namespace in other branches
- 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\ActionCode
public function execute($entity = NULL) {
/** @var \Drupal\webform\WebformSubmissionInterface $entity */
$entity
->setSticky(FALSE)
->save();
}