summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathaniel Catchpole2017-11-15 14:30:31 +0000
committerNathaniel Catchpole2017-11-15 14:33:18 +0000
commit2bd52f5d50f4eb5b0e7629498d58ed8f61259c33 (patch)
tree762e34e16b44f645e8841b2048c303d25cc9a58c
parent37d0cad9e75eaaafeebac113c13c55bb21b9225b (diff)
Issue #2922285 by mstef, timmillwood: Classes should use StateTransitionValidationInterface rather than StateTransitionValidation
-rw-r--r--core/modules/content_moderation/src/Form/EntityModerationForm.php10
-rw-r--r--core/modules/content_moderation/src/Plugin/Field/FieldWidget/ModerationStateWidget.php8
2 files changed, 9 insertions, 9 deletions
diff --git a/core/modules/content_moderation/src/Form/EntityModerationForm.php b/core/modules/content_moderation/src/Form/EntityModerationForm.php
index e6dc887..34de973 100644
--- a/core/modules/content_moderation/src/Form/EntityModerationForm.php
+++ b/core/modules/content_moderation/src/Form/EntityModerationForm.php
@@ -8,7 +8,7 @@ use Drupal\Core\Entity\RevisionLogInterface;
use Drupal\Core\Form\FormBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\content_moderation\ModerationInformationInterface;
-use Drupal\content_moderation\StateTransitionValidation;
+use Drupal\content_moderation\StateTransitionValidationInterface;
use Drupal\workflows\Transition;
use Symfony\Component\DependencyInjection\ContainerInterface;
@@ -36,7 +36,7 @@ class EntityModerationForm extends FormBase {
/**
* The moderation state transition validation service.
*
- * @var \Drupal\content_moderation\StateTransitionValidation
+ * @var \Drupal\content_moderation\StateTransitionValidationInterface
*/
protected $validation;
@@ -45,15 +45,15 @@ class EntityModerationForm extends FormBase {
*
* @param \Drupal\content_moderation\ModerationInformationInterface $moderation_info
* The moderation information service.
- * @param \Drupal\content_moderation\StateTransitionValidation $validation
+ * @param \Drupal\content_moderation\StateTransitionValidationInterface $validation
* The moderation state transition validation service.
* @param \Drupal\Component\Datetime\Time $time
* The time service.
*/
- public function __construct(ModerationInformationInterface $moderation_info, StateTransitionValidation $validation, Time $time) {
+ public function __construct(ModerationInformationInterface $moderation_info, StateTransitionValidationInterface $validation, Time $time) {
$this->moderationInfo = $moderation_info;
- $this->time = $time;
$this->validation = $validation;
+ $this->time = $time;
}
/**
diff --git a/core/modules/content_moderation/src/Plugin/Field/FieldWidget/ModerationStateWidget.php b/core/modules/content_moderation/src/Plugin/Field/FieldWidget/ModerationStateWidget.php
index fff3cb0..967dce8 100644
--- a/core/modules/content_moderation/src/Plugin/Field/FieldWidget/ModerationStateWidget.php
+++ b/core/modules/content_moderation/src/Plugin/Field/FieldWidget/ModerationStateWidget.php
@@ -11,7 +11,7 @@ use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
use Drupal\Core\Session\AccountInterface;
use Drupal\content_moderation\ModerationInformation;
-use Drupal\content_moderation\StateTransitionValidation;
+use Drupal\content_moderation\StateTransitionValidationInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
@@ -51,7 +51,7 @@ class ModerationStateWidget extends OptionsSelectWidget implements ContainerFact
/**
* Moderation state transition validation service.
*
- * @var \Drupal\content_moderation\StateTransitionValidation
+ * @var \Drupal\content_moderation\StateTransitionValidationInterface
*/
protected $validator;
@@ -74,10 +74,10 @@ class ModerationStateWidget extends OptionsSelectWidget implements ContainerFact
* Entity type manager.
* @param \Drupal\content_moderation\ModerationInformation $moderation_information
* Moderation information service.
- * @param \Drupal\content_moderation\StateTransitionValidation $validator
+ * @param \Drupal\content_moderation\StateTransitionValidationInterface $validator
* Moderation state transition validation service.
*/
- public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, array $third_party_settings, AccountInterface $current_user, EntityTypeManagerInterface $entity_type_manager, ModerationInformation $moderation_information, StateTransitionValidation $validator) {
+ public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, array $third_party_settings, AccountInterface $current_user, EntityTypeManagerInterface $entity_type_manager, ModerationInformation $moderation_information, StateTransitionValidationInterface $validator) {
parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $third_party_settings);
$this->entityTypeManager = $entity_type_manager;
$this->currentUser = $current_user;