public function BreakLock::execute in Content locking (anti-concurrent editing) 8
Same name and namespace in other branches
- 8.2 src/Plugin/Action/BreakLock.php \Drupal\content_lock\Plugin\Action\BreakLock::execute()
Executes the plugin.
Overrides ExecutableInterface::execute
File
- src/
Plugin/ Action/ BreakLock.php, line 62
Class
- BreakLock
- Provides an action that can break a lock.
Namespace
Drupal\content_lock\Plugin\ActionCode
public function execute(ContentEntityInterface $entity = NULL) {
$this->lockService
->release($entity
->id(), $entity
->language(), NULL, NULL, $entity
->getEntityTypeId());
}