function ContentModeration::defaultConfiguration
Same name in other branches
- 8.9.x core/modules/content_moderation/src/Plugin/WorkflowType/ContentModeration.php \Drupal\content_moderation\Plugin\WorkflowType\ContentModeration::defaultConfiguration()
- 10 core/modules/content_moderation/src/Plugin/WorkflowType/ContentModeration.php \Drupal\content_moderation\Plugin\WorkflowType\ContentModeration::defaultConfiguration()
- 11.x core/modules/content_moderation/src/Plugin/WorkflowType/ContentModeration.php \Drupal\content_moderation\Plugin\WorkflowType\ContentModeration::defaultConfiguration()
Overrides WorkflowTypeBase::defaultConfiguration
File
-
core/
modules/ content_moderation/ src/ Plugin/ WorkflowType/ ContentModeration.php, line 193
Class
- ContentModeration
- Attaches workflows to content entity types and their bundles.
Namespace
Drupal\content_moderation\Plugin\WorkflowTypeCode
public function defaultConfiguration() {
return [
'states' => [
'draft' => [
'label' => 'Draft',
'published' => FALSE,
'default_revision' => FALSE,
'weight' => 0,
],
'published' => [
'label' => 'Published',
'published' => TRUE,
'default_revision' => TRUE,
'weight' => 1,
],
],
'transitions' => [
'create_new_draft' => [
'label' => 'Create New Draft',
'to' => 'draft',
'weight' => 0,
'from' => [
'draft',
'published',
],
],
'publish' => [
'label' => 'Publish',
'to' => 'published',
'weight' => 1,
'from' => [
'draft',
'published',
],
],
],
'entity_types' => [],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.