Same name and namespace in other branches
- 8.9.x core/modules/content_moderation/src/Plugin/WorkflowType/ContentModerationInterface.php \Drupal\content_moderation\Plugin\WorkflowType\ContentModerationInterface
- 9 core/modules/content_moderation/src/Plugin/WorkflowType/ContentModerationInterface.php \Drupal\content_moderation\Plugin\WorkflowType\ContentModerationInterface
Interface for ContentModeration WorkflowType plugin.
Hierarchy
- interface \Drupal\Core\Plugin\PluginWithFormsInterface; interface \Drupal\Component\Plugin\DerivativeInspectionInterface; interface \Drupal\Component\Plugin\ConfigurableInterface; interface \Drupal\Component\Plugin\DependentPluginInterface
- interface \Drupal\workflows\WorkflowTypeInterface
- interface \Drupal\content_moderation\Plugin\WorkflowType\ContentModerationInterface
- interface \Drupal\workflows\WorkflowTypeInterface
Expanded class hierarchy of ContentModerationInterface
All classes that implement ContentModerationInterface
File
- core/
modules/ content_moderation/ src/ Plugin/ WorkflowType/ ContentModerationInterface.php, line 10
Namespace
Drupal\content_moderation\Plugin\WorkflowTypeView source
interface ContentModerationInterface extends WorkflowTypeInterface {
/**
* Gets the entity types the workflow is applied to.
*
* @return string[]
* The entity types the workflow is applied to.
*/
public function getEntityTypes();
/**
* 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.
*/
public function getBundlesForEntityType($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.
*/
public function appliesToEntityTypeAndBundle($entity_type_id, $bundle_id);
/**
* 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.
*/
public function removeEntityTypeAndBundle($entity_type_id, $bundle_id);
/**
* 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.
*/
public function addEntityTypeAndBundle($entity_type_id, $bundle_id);
/**
* {@inheritdoc}
*
* @param $entity
* Content Moderation uses this parameter to determine the initial state
* based on publishing status.
*/
public function getInitialState($entity = NULL);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ConfigurableInterface:: |
public | function | Gets default configuration for this plugin. | 23 |
ConfigurableInterface:: |
public | function | Gets this plugin's configuration. | 13 |
ConfigurableInterface:: |
public | function | Sets the configuration for this plugin instance. | 13 |
ContentModerationInterface:: |
public | function | Add an entity type ID / bundle ID to the workflow. | |
ContentModerationInterface:: |
public | function | Checks if the workflow applies to the supplied entity type and bundle. | |
ContentModerationInterface:: |
public | function | Gets any bundles the workflow is applied to for the given entity type. | |
ContentModerationInterface:: |
public | function | Gets the entity types the workflow is applied to. | |
ContentModerationInterface:: |
public | function |
Overrides WorkflowTypeInterface:: |
|
ContentModerationInterface:: |
public | function | Removes an entity type ID / bundle ID from the workflow. | |
DependentPluginInterface:: |
public | function | Calculates dependencies for the configured plugin. | 16 |
DerivativeInspectionInterface:: |
public | function | Gets the base_plugin_id of the plugin instance. | 1 |
DerivativeInspectionInterface:: |
public | function | Gets the derivative_id of the plugin instance. | 1 |
PluginInspectionInterface:: |
public | function | Gets the definition of the plugin implementation. | 4 |
PluginInspectionInterface:: |
public | function | Gets the plugin_id of the plugin instance. | 2 |
PluginWithFormsInterface:: |
public | function | Gets the form class for the given operation. | |
PluginWithFormsInterface:: |
public | function | Gets whether the plugin has a form class for the given operation. | |
WorkflowTypeInterface:: |
public | function | Adds a state to the workflow. | 1 |
WorkflowTypeInterface:: |
public | function | Adds a transition to the workflow. | 1 |
WorkflowTypeInterface:: |
public | function | Deletes a state from the workflow. | 1 |
WorkflowTypeInterface:: |
public | function | Deletes a transition. | 1 |
WorkflowTypeInterface:: |
public | function | Gets the required states of workflow type. | 1 |
WorkflowTypeInterface:: |
public | function | Gets a workflow state. | 1 |
WorkflowTypeInterface:: |
public | function | Gets state objects for the provided state IDs. | 1 |
WorkflowTypeInterface:: |
public | function | Gets a transition object for the provided transition ID. | 1 |
WorkflowTypeInterface:: |
public | function | Gets a transition from state to state. | 1 |
WorkflowTypeInterface:: |
public | function | Gets transition objects for the provided transition IDs. | 1 |
WorkflowTypeInterface:: |
public | function | Gets the transitions for a state for the provided direction. | 1 |
WorkflowTypeInterface:: |
public | function | Determines if the workflow has a state with the provided ID. | 1 |
WorkflowTypeInterface:: |
public | function | Determines if a transition exists. | 1 |
WorkflowTypeInterface:: |
public | function | Determines if a transition from state to state exists. | 1 |
WorkflowTypeInterface:: |
public | function | Gets the label for the workflow type. | 1 |
WorkflowTypeInterface:: |
public | function | Informs the plugin that a dependency of the workflow will be deleted. | 1 |
WorkflowTypeInterface:: |
constant | The key of the global workflow plugin form. | ||
WorkflowTypeInterface:: |
public | function | Sets a state's label. | 1 |
WorkflowTypeInterface:: |
public | function | Sets a state's weight value. | 1 |
WorkflowTypeInterface:: |
public | function | Sets a transition's from states. | 1 |
WorkflowTypeInterface:: |
public | function | Sets a transition's label. | 1 |
WorkflowTypeInterface:: |
public | function | Sets a transition's weight. | 1 |
WorkflowTypeInterface:: |
public | function | Determines if the workflow is being has data associated with it. | 1 |
WorkflowTypeInterface:: |
public | function | Determines if the workflow state has data associated with it. | 1 |