public function EntityStatus::resetStatus in CMS Content Sync 8
Same name and namespace in other branches
- 2.1.x src/Entity/EntityStatus.php \Drupal\cms_content_sync\Entity\EntityStatus::resetStatus()
- 2.0.x src/Entity/EntityStatus.php \Drupal\cms_content_sync\Entity\EntityStatus::resetStatus()
Parameters
$entity:
File
- src/
Entity/ EntityStatus.php, line 244
Class
- EntityStatus
- Defines the "Content Sync - Entity Status" entity type.
Namespace
Drupal\cms_content_sync\EntityCode
public function resetStatus() {
$this
->setLastPush(null);
$this
->setLastPull(null);
$this
->save();
// Above cache clearing doesn't work reliably. So we reset the whole entity cache.
\Drupal::service('cache.entity')
->deleteAll();
}