You are here

public function EntityStatus::wasLastPushReset in CMS Content Sync 2.0.x

Same name and namespace in other branches
  1. 8 src/Entity/EntityStatus.php \Drupal\cms_content_sync\Entity\EntityStatus::wasLastPushReset()
  2. 2.1.x src/Entity/EntityStatus.php \Drupal\cms_content_sync\Entity\EntityStatus::wasLastPushReset()

Returns the information if the entity has been pushed before but the last push date was reset.

Parameters

bool $set: Optional parameter to set the value for LastPushReset

Return value

bool

1 call to EntityStatus::wasLastPushReset()
EntityStatus::setLastPush in src/Entity/EntityStatus.php
Set the last pull timestamp.

File

src/Entity/EntityStatus.php, line 484

Class

EntityStatus
Defines the "Content Sync - Entity Status" entity type.

Namespace

Drupal\cms_content_sync\Entity

Code

public function wasLastPushReset($set = null) {
  if (true === $set) {
    $this
      ->set('flags', $this
      ->get('flags')->value | self::FLAG_LAST_PUSH_RESET);
  }
  elseif (false === $set) {
    $this
      ->set('flags', $this
      ->get('flags')->value & ~self::FLAG_LAST_PUSH_RESET);
  }
  return (bool) ($this
    ->get('flags')->value & self::FLAG_LAST_PUSH_RESET);
}