You are here

public function ImportEntity::setPublished in Content Synchronizer 3.x

Same name and namespace in other branches
  1. 8.2 src/Entity/ImportEntity.php \Drupal\content_synchronizer\Entity\ImportEntity::setPublished()
  2. 8 src/Entity/ImportEntity.php \Drupal\content_synchronizer\Entity\ImportEntity::setPublished()

Sets the published status of a Import.

Parameters

bool $published: TRUE to set this Import to published, FALSE to set it to unpublished.

Return value

\Drupal\content_synchronizer\Entity\ImportEntityInterface The called Import entity.

Overrides ImportEntityInterface::setPublished

File

src/Entity/ImportEntity.php, line 193

Class

ImportEntity
Defines the Import entity.

Namespace

Drupal\content_synchronizer\Entity

Code

public function setPublished($published) {
  $this
    ->set('status', $published ? TRUE : FALSE);
  return $this;
}