diff --git a/core/modules/content_moderation/src/EntityTypeInfo.php b/core/modules/content_moderation/src/EntityTypeInfo.php index 1ccfbf5eb9..8f6ac4d79e 100644 --- a/core/modules/content_moderation/src/EntityTypeInfo.php +++ b/core/modules/content_moderation/src/EntityTypeInfo.php @@ -3,12 +3,10 @@ namespace Drupal\content_moderation; use Drupal\content_moderation\Plugin\Field\ModerationStateFieldItemList; -use Drupal\Core\Config\Entity\ConfigEntityTypeInterface; use Drupal\Core\Entity\BundleEntityFormBase; use Drupal\Core\Entity\ContentEntityFormInterface; use Drupal\Core\DependencyInjection\ContainerInjectionInterface; use Drupal\Core\Entity\ContentEntityTypeInterface; -use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\EntityTypeBundleInfoInterface; use Drupal\Core\Entity\EntityTypeInterface; use Drupal\Core\Entity\EntityTypeManagerInterface; @@ -17,7 +15,6 @@ use Drupal\Core\Session\AccountInterface; use Drupal\Core\StringTranslation\StringTranslationTrait; use Drupal\Core\StringTranslation\TranslationInterface; -use Drupal\Core\Url; use Drupal\content_moderation\Entity\Handler\BlockContentModerationHandler; use Drupal\content_moderation\Entity\Handler\ModerationHandler; use Drupal\content_moderation\Entity\Handler\NodeModerationHandler; diff --git a/core/modules/content_moderation/src/Form/WorkflowTypeEditForm.php b/core/modules/content_moderation/src/Form/WorkflowTypeEditForm.php index 8848cec790..2c6a8206dd 100644 --- a/core/modules/content_moderation/src/Form/WorkflowTypeEditForm.php +++ b/core/modules/content_moderation/src/Form/WorkflowTypeEditForm.php @@ -105,7 +105,10 @@ public function buildForm(array $form, FormStateInterface $form_state, WorkflowI if (!$moderation_enabled || $workflow_moderation_enabled) { // Add the bundle to the options if it's not enabled on a workflow, // unless the workflow it's enabled on is this one. - $options[$bundle_id] = ['type' => $bundle['label']]; + $options[$bundle_id] = [ + 'type' => $bundle['label'], + '#attributes' => ['class' => [$workflow_moderation_enabled ? 'selected' : '']], + ]; // Add the bundle to the list of default values if it's enabled on this // workflow. $defaults[$bundle_id] = $workflow_moderation_enabled; diff --git a/core/modules/content_moderation/src/Plugin/WorkflowType/ContentModeration.php b/core/modules/content_moderation/src/Plugin/WorkflowType/ContentModeration.php index e9922105ec..c5cf48a649 100644 --- a/core/modules/content_moderation/src/Plugin/WorkflowType/ContentModeration.php +++ b/core/modules/content_moderation/src/Plugin/WorkflowType/ContentModeration.php @@ -56,7 +56,7 @@ class ContentModeration extends WorkflowTypeFormBase implements ContainerFactory protected $moderationInfo; /** - * Constructs an ContentModeration object. + * Constructs a ContentModeration object. * * @param array $configuration * A configuration array containing information about the plugin instance. @@ -328,7 +328,7 @@ public function getConfiguration() { /** * {@inheritdoc} */ - public function buildConfigurationForm(array $form, FormStateInterface $form_state, WorkflowInterface $workflow = null) { + public function buildConfigurationForm(array $form, FormStateInterface $form_state, WorkflowInterface $workflow = NULL) { $header = [ 'type' => $this->t('Items'), 'operations' => $this->t('Operations')