interface ContentModerationInterface
Same name in other branches
- 9 core/modules/content_moderation/src/Plugin/WorkflowType/ContentModerationInterface.php \Drupal\content_moderation\Plugin\WorkflowType\ContentModerationInterface
- 10 core/modules/content_moderation/src/Plugin/WorkflowType/ContentModerationInterface.php \Drupal\content_moderation\Plugin\WorkflowType\ContentModerationInterface
- 11.x core/modules/content_moderation/src/Plugin/WorkflowType/ContentModerationInterface.php \Drupal\content_moderation\Plugin\WorkflowType\ContentModerationInterface
Interface for ContentModeration WorkflowType plugin.
Hierarchy
- interface \Drupal\Component\Plugin\ConfigurableInterface; interface \Drupal\Component\Plugin\ConfigurablePluginInterface extends \Drupal\Component\Plugin\DependentPluginInterface; interface \Drupal\Component\Plugin\DependentPluginInterface; interface \Drupal\Component\Plugin\DerivativeInspectionInterface; interface \Drupal\Core\Plugin\PluginWithFormsInterface extends \Drupal\Component\Plugin\PluginInspectionInterface
- interface \Drupal\workflows\WorkflowTypeInterface extends \Drupal\Core\Plugin\PluginWithFormsInterface \Drupal\Component\Plugin\DerivativeInspectionInterface \Drupal\Component\Plugin\ConfigurableInterface \Drupal\Component\Plugin\DependentPluginInterface \Drupal\Component\Plugin\ConfigurablePluginInterface
- interface \Drupal\content_moderation\Plugin\WorkflowType\ContentModerationInterface extends \Drupal\workflows\WorkflowTypeInterface
- interface \Drupal\workflows\WorkflowTypeInterface extends \Drupal\Core\Plugin\PluginWithFormsInterface \Drupal\Component\Plugin\DerivativeInspectionInterface \Drupal\Component\Plugin\ConfigurableInterface \Drupal\Component\Plugin\DependentPluginInterface \Drupal\Component\Plugin\ConfigurablePluginInterface
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
Title Sort descending | Modifiers | Object type | Summary | Overriden Title | Overrides |
---|---|---|---|---|---|
ConfigurableInterface::defaultConfiguration | public | function | Gets default configuration for this plugin. | 14 | |
ConfigurableInterface::getConfiguration | public | function | Gets this plugin's configuration. | 14 | |
ConfigurableInterface::setConfiguration | public | function | Sets the configuration for this plugin instance. | 14 | |
ContentModerationInterface::addEntityTypeAndBundle | public | function | Add an entity type ID / bundle ID to the workflow. | 1 | |
ContentModerationInterface::appliesToEntityTypeAndBundle | public | function | Checks if the workflow applies to the supplied entity type and bundle. | 1 | |
ContentModerationInterface::getBundlesForEntityType | public | function | Gets any bundles the workflow is applied to for the given entity type. | 1 | |
ContentModerationInterface::getEntityTypes | public | function | Gets the entity types the workflow is applied to. | 1 | |
ContentModerationInterface::getInitialState | public | function | Overrides WorkflowTypeInterface::getInitialState | ||
ContentModerationInterface::removeEntityTypeAndBundle | public | function | Removes an entity type ID / bundle ID from the workflow. | 1 | |
DependentPluginInterface::calculateDependencies | public | function | Calculates dependencies for the configured plugin. | 21 | |
DerivativeInspectionInterface::getBaseId | public | function | Gets the base_plugin_id of the plugin instance. | 1 | |
DerivativeInspectionInterface::getDerivativeId | public | function | Gets the derivative_id of the plugin instance. | 1 | |
PluginInspectionInterface::getPluginDefinition | public | function | Gets the definition of the plugin implementation. | 6 | |
PluginInspectionInterface::getPluginId | public | function | Gets the plugin_id of the plugin instance. | 2 | |
PluginWithFormsInterface::getFormClass | public | function | Gets the form class for the given operation. | ||
PluginWithFormsInterface::hasFormClass | public | function | Gets whether the plugin has a form class for the given operation. | ||
WorkflowTypeInterface::addState | public | function | Adds a state to the workflow. | 1 | |
WorkflowTypeInterface::addTransition | public | function | Adds a transition to the workflow. | 1 | |
WorkflowTypeInterface::deleteState | public | function | Deletes a state from the workflow. | 1 | |
WorkflowTypeInterface::deleteTransition | public | function | Deletes a transition. | 1 | |
WorkflowTypeInterface::getRequiredStates | public | function | Gets the required states of workflow type. | 1 | |
WorkflowTypeInterface::getState | public | function | Gets a workflow state. | 1 | |
WorkflowTypeInterface::getStates | public | function | Gets state objects for the provided state IDs. | 1 | |
WorkflowTypeInterface::getTransition | public | function | Gets a transition object for the provided transition ID. | 1 | |
WorkflowTypeInterface::getTransitionFromStateToState | public | function | Gets a transition from state to state. | 1 | |
WorkflowTypeInterface::getTransitions | public | function | Gets transition objects for the provided transition IDs. | 1 | |
WorkflowTypeInterface::getTransitionsForState | public | function | Gets the transition IDs for a state for the provided direction. | 1 | |
WorkflowTypeInterface::hasState | public | function | Determines if the workflow has a state with the provided ID. | 1 | |
WorkflowTypeInterface::hasTransition | public | function | Determines if a transition exists. | 1 | |
WorkflowTypeInterface::hasTransitionFromStateToState | public | function | Determines if a transition from state to state exists. | 1 | |
WorkflowTypeInterface::label | public | function | Gets the label for the workflow type. | 1 | |
WorkflowTypeInterface::onDependencyRemoval | public | function | Informs the plugin that a dependency of the workflow will be deleted. | 1 | |
WorkflowTypeInterface::PLUGIN_FORM_KEY | constant | The key of the global workflow plugin form. | |||
WorkflowTypeInterface::setStateLabel | public | function | Sets a state's label. | 1 | |
WorkflowTypeInterface::setStateWeight | public | function | Sets a state's weight value. | 1 | |
WorkflowTypeInterface::setTransitionFromStates | public | function | Sets a transition's from states. | 1 | |
WorkflowTypeInterface::setTransitionLabel | public | function | Sets a transition's label. | 1 | |
WorkflowTypeInterface::setTransitionWeight | public | function | Sets a transition's weight. | 1 | |
WorkflowTypeInterface::workflowHasData | public | function | Determines if the workflow is being has data associated with it. | 1 | |
WorkflowTypeInterface::workflowStateHasData | public | function | Determines if the workflow state has data associated with it. | 1 |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.