public function EntityStatus::wasPushedEmbedded 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::wasPushedEmbedded()
- 2.0.x src/Entity/EntityStatus.php \Drupal\cms_content_sync\Entity\EntityStatus::wasPushedEmbedded()
Returns whether the entity was pushed embedded into another parent entity. This is always done for field collections but can also be enabled for other entities like paragraphs or media entities. This can save a lot of requests when entities aren't all syndicated individually.
Parameters
bool $set: Optional parameter to set the value for the flag
Return value
bool
File
- src/
Entity/ EntityStatus.php, line 788
Class
- EntityStatus
- Defines the "Content Sync - Entity Status" entity type.
Namespace
Drupal\cms_content_sync\EntityCode
public function wasPushedEmbedded($set = null) {
if (true === $set) {
$this
->set('flags', $this
->get('flags')->value | self::FLAG_PUSHED_EMBEDDED);
}
elseif (false === $set) {
$this
->set('flags', $this
->get('flags')->value & ~self::FLAG_PUSHED_EMBEDDED);
}
return (bool) ($this
->get('flags')->value & self::FLAG_PUSHED_EMBEDDED);
}