function ModerationInformationInterface::getWorkflowForEntity

Same name and namespace in other branches
  1. 9 core/modules/content_moderation/src/ModerationInformationInterface.php \Drupal\content_moderation\ModerationInformationInterface::getWorkflowForEntity()
  2. 10 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.

1 method overrides ModerationInformationInterface::getWorkflowForEntity()
ModerationInformation::getWorkflowForEntity in core/modules/content_moderation/src/ModerationInformation.php
Gets the workflow for the given content entity.

File

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

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.