You are here

public function EntityStatus::wasLastPullReset in CMS Content Sync 8

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

Returns the information if the entity has been pulled before but the last import date was reset.

Parameters

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

Return value

bool

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

File

src/Entity/EntityStatus.php, line 500

Class

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

Namespace

Drupal\cms_content_sync\Entity

Code

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