function ModerationInformationInterface::getWorkflowForEntity

Same name in other branches
  1. 9 core/modules/content_moderation/src/ModerationInformationInterface.php \Drupal\content_moderation\ModerationInformationInterface::getWorkflowForEntity()
  2. 8.9.x core/modules/content_moderation/src/ModerationInformationInterface.php \Drupal\content_moderation\ModerationInformationInterface::getWorkflowForEntity()
  3. 11.x core/modules/content_moderation/src/ModerationInformationInterface.php \Drupal\content_moderation\ModerationInformationInterface::getWorkflowForEntity()

Gets the workflow for the given content entity.

Parameters

\Drupal\Core\Entity\ContentEntityInterface $entity: The content entity to get the workflow for.

Return value

\Drupal\workflows\WorkflowInterface|null The workflow entity. NULL if there is no workflow.

File

core/modules/content_moderation/src/ModerationInformationInterface.php, line 135

Class

ModerationInformationInterface
Interface for moderation_information service.

Namespace

Drupal\content_moderation

Code

public function getWorkflowForEntity(ContentEntityInterface $entity);

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.