You are here

protected function EntityPublisher::isPublishable in Content Synchronizer 8

Same name and namespace in other branches
  1. 8.2 src/Service/EntityPublisher.php \Drupal\content_synchronizer\Service\EntityPublisher::isPublishable()
  2. 3.x src/Service/EntityPublisher.php \Drupal\content_synchronizer\Service\EntityPublisher::isPublishable()

Check if the entity is publishable.

Parameters

\Drupal\Core\Entity\Entity $entity: The entity to check.

Return value

bool The publishable state.

1 call to EntityPublisher::isPublishable()
EntityPublisher::saveEntityWithUnpublishedStatus in src/Service/EntityPublisher.php
Try to unpublish entity if it needs to be created. Either default save.

File

src/Service/EntityPublisher.php, line 129

Class

EntityPublisher
THe entity publsher service.

Namespace

Drupal\content_synchronizer\Service

Code

protected function isPublishable(Entity $entity) {
  return method_exists($entity, 'setPublished');
}