public function EntityStatus::setLastPush 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::setLastPush()
- 2.0.x src/Entity/EntityStatus.php \Drupal\cms_content_sync\Entity\EntityStatus::setLastPush()
Set the last pull timestamp.
Parameters
int $timestamp:
1 call to EntityStatus::setLastPush()
- EntityStatus::resetStatus in src/
Entity/ EntityStatus.php
File
- src/
Entity/ EntityStatus.php, line 940
Class
- EntityStatus
- Defines the "Content Sync - Entity Status" entity type.
Namespace
Drupal\cms_content_sync\EntityCode
public function setLastPush($timestamp) {
if ($this
->getLastPush() == $timestamp) {
return;
}
$this
->set('last_export', $timestamp);
// As this push was successful, we can now reset the flags for status entity resets and failed exports.
if (!empty($timestamp)) {
$this
->wasLastPushReset(false);
$this
->didPushFail(false);
}
else {
$this
->wasLastPushReset(true);
}
}