You are here

public function EntityStatus::isDeleted 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::isDeleted()
  2. 2.0.x src/Entity/EntityStatus.php \Drupal\cms_content_sync\Entity\EntityStatus::isDeleted()

Returns the information if the entity is deleted.

Parameters

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

Return value

bool

File

src/Entity/EntityStatus.php, line 766

Class

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

Namespace

Drupal\cms_content_sync\Entity

Code

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