protected function PushIntent::saveFailedPush in CMS Content Sync 8
Same name and namespace in other branches
- 2.1.x src/PushIntent.php \Drupal\cms_content_sync\PushIntent::saveFailedPush()
- 2.0.x src/PushIntent.php \Drupal\cms_content_sync\PushIntent::saveFailedPush()
Save that the pull for the given entity failed.
Parameters
string $failure_reason: See PushIntent::PUSH_FAILURE_*
null|string $message: An optional message accompanying this error
Throws
\Drupal\Core\Entity\EntityStorageException
2 calls to PushIntent::saveFailedPush()
- PushIntent::execute in src/
PushIntent.php - Push the given entity.
- PushIntent::pushReference in src/
PushIntent.php
File
- src/
PushIntent.php, line 993
Class
- PushIntent
- Class PushIntent.
Namespace
Drupal\cms_content_syncCode
protected function saveFailedPush($failure_reason, $message = null) {
$soft_fails = [
PushIntent::PUSH_FAILED_HANDLER_DENIED,
PushIntent::PUSH_FAILED_UNCHANGED,
];
$soft = in_array($failure_reason, $soft_fails);
$this->entity_status
->didPushFail(true, $soft, [
'error' => $failure_reason,
'action' => $this
->getAction(),
'reason' => $this
->getReason(),
'message' => $message,
]);
$this->entity_status
->save();
}