You are here

public function ResetStatusEntity::execute in CMS Content Sync 8

Same name and namespace in other branches
  1. 2.1.x modules/cms_content_sync_views/src/Plugin/Action/ResetStatusEntity.php \Drupal\cms_content_sync_views\Plugin\Action\ResetStatusEntity::execute()
  2. 2.0.x modules/cms_content_sync_views/src/Plugin/Action/ResetStatusEntity.php \Drupal\cms_content_sync_views\Plugin\Action\ResetStatusEntity::execute()

Executes the plugin.

Overrides ExecutableInterface::execute

File

modules/cms_content_sync_views/src/Plugin/Action/ResetStatusEntity.php, line 22

Class

ResetStatusEntity
Reset status entity.

Namespace

Drupal\cms_content_sync_views\Plugin\Action

Code

public function execute($entity = NULL) {

  /** @var \Drupal\cms_content_sync\Entity\EntityStatus $entity */
  if (!is_null($entity)) {
    $entity
      ->resetStatus();
  }
}