Mercurial > hg > isophonics-drupal-site
diff core/modules/content_moderation/src/ModerationInformationInterface.php @ 18:af1871eacc83
Update to Drupal core 8.7.1
author | Chris Cannam |
---|---|
date | Thu, 09 May 2019 15:33:08 +0100 |
parents | 129ea1e6d783 |
children |
line wrap: on
line diff
--- a/core/modules/content_moderation/src/ModerationInformationInterface.php Thu Feb 28 13:21:36 2019 +0000 +++ b/core/modules/content_moderation/src/ModerationInformationInterface.php Thu May 09 15:33:08 2019 +0100 @@ -48,6 +48,17 @@ public function shouldModerateEntitiesOfBundle(EntityTypeInterface $entity_type, $bundle); /** + * Determines if an entity type has at least one moderated bundle. + * + * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type + * The entity type definition to check. + * + * @return bool + * TRUE if an entity type has a moderated bundle, FALSE otherwise. + */ + public function isModeratedEntityType(EntityTypeInterface $entity_type); + + /** * Loads the latest revision of a specific entity. * * @param string $entity_type_id @@ -164,6 +175,19 @@ public function getWorkflowForEntity(ContentEntityInterface $entity); /** + * Gets the workflow for the given entity type and bundle. + * + * @param string $entity_type_id + * The entity type ID. + * @param string $bundle_id + * The entity bundle ID. + * + * @return \Drupal\workflows\WorkflowInterface|null + * The associated workflow. NULL if there is no workflow. + */ + public function getWorkflowForEntityTypeAndBundle($entity_type_id, $bundle_id); + + /** * Gets unsupported features for a given entity type. * * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type