summaryrefslogtreecommitdiffstats
path: root/core/modules/content_moderation/src/Plugin/WorkflowType/ContentModeration.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/content_moderation/src/Plugin/WorkflowType/ContentModeration.php')
-rw-r--r--core/modules/content_moderation/src/Plugin/WorkflowType/ContentModeration.php43
1 files changed, 6 insertions, 37 deletions
diff --git a/core/modules/content_moderation/src/Plugin/WorkflowType/ContentModeration.php b/core/modules/content_moderation/src/Plugin/WorkflowType/ContentModeration.php
index 1515cb4..358314a 100644
--- a/core/modules/content_moderation/src/Plugin/WorkflowType/ContentModeration.php
+++ b/core/modules/content_moderation/src/Plugin/WorkflowType/ContentModeration.php
@@ -31,7 +31,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
* },
* )
*/
-class ContentModeration extends WorkflowTypeBase implements ContainerFactoryPluginInterface {
+class ContentModeration extends WorkflowTypeBase implements ContentModerationInterface, ContainerFactoryPluginInterface {
use StringTranslationTrait;
@@ -135,52 +135,28 @@ class ContentModeration extends WorkflowTypeBase implements ContainerFactoryPlug
}
/**
- * Gets the entity types the workflow is applied to.
- *
- * @return string[]
- * The entity types the workflow is applied to.
+ * {@inheritdoc}
*/
public function getEntityTypes() {
return array_keys($this->configuration['entity_types']);
}
/**
- * Gets any bundles the workflow is applied to for the given entity type.
- *
- * @param string $entity_type_id
- * The entity type ID to get the bundles for.
- *
- * @return string[]
- * The bundles of the entity type the workflow is applied to or an empty
- * array if the entity type is not applied to the workflow.
+ * {@inheritdoc}
*/
public function getBundlesForEntityType($entity_type_id) {
return isset($this->configuration['entity_types'][$entity_type_id]) ? $this->configuration['entity_types'][$entity_type_id] : [];
}
/**
- * Checks if the workflow applies to the supplied entity type and bundle.
- *
- * @param string $entity_type_id
- * The entity type ID to check.
- * @param string $bundle_id
- * The bundle ID to check.
- *
- * @return bool
- * TRUE if the workflow applies to the supplied entity type ID and bundle
- * ID. FALSE if not.
+ * {@inheritdoc}
*/
public function appliesToEntityTypeAndBundle($entity_type_id, $bundle_id) {
return in_array($bundle_id, $this->getBundlesForEntityType($entity_type_id), TRUE);
}
/**
- * Removes an entity type ID / bundle ID from the workflow.
- *
- * @param string $entity_type_id
- * The entity type ID to remove.
- * @param string $bundle_id
- * The bundle ID to remove.
+ * {@inheritdoc}
*/
public function removeEntityTypeAndBundle($entity_type_id, $bundle_id) {
if (!isset($this->configuration['entity_types'][$entity_type_id])) {
@@ -199,14 +175,7 @@ class ContentModeration extends WorkflowTypeBase implements ContainerFactoryPlug
}
/**
- * Add an entity type ID / bundle ID to the workflow.
- *
- * @param string $entity_type_id
- * The entity type ID to add. It is responsibility of the caller to provide
- * a valid entity type ID.
- * @param string $bundle_id
- * The bundle ID to add. It is responsibility of the caller to provide a
- * valid bundle ID.
+ * {@inheritdoc}
*/
public function addEntityTypeAndBundle($entity_type_id, $bundle_id) {
if (!$this->appliesToEntityTypeAndBundle($entity_type_id, $bundle_id)) {