From 887b1e4c351b17b48c8f116d220c39e8964da1b4 Mon Sep 17 00:00:00 2001 From: Alex Pott <alex.a.pott@googlemail.com> Date: Wed, 9 Sep 2015 14:21:11 +0100 Subject: [PATCH] Issue #2551105 by Dave Reid: BaseCommand should not be in the quickedit namespace, useful for anything --- .../src => lib/Drupal/Core}/Ajax/BaseCommand.php | 8 +++----- .../editor/src/Ajax/GetUntransformedTextCommand.php | 3 +-- core/modules/quickedit/src/Ajax/EntitySavedCommand.php | 2 ++ core/modules/quickedit/src/Ajax/FieldFormCommand.php | 2 ++ core/modules/quickedit/src/Ajax/FieldFormSavedCommand.php | 2 ++ .../src/Ajax/FieldFormValidationErrorsCommand.php | 2 ++ 6 files changed, 12 insertions(+), 7 deletions(-) rename core/{modules/quickedit/src => lib/Drupal/Core}/Ajax/BaseCommand.php (78%) diff --git a/core/modules/quickedit/src/Ajax/BaseCommand.php b/core/lib/Drupal/Core/Ajax/BaseCommand.php similarity index 78% rename from core/modules/quickedit/src/Ajax/BaseCommand.php rename to core/lib/Drupal/Core/Ajax/BaseCommand.php index 896eef1e5abe..86d694dec835 100644 --- a/core/modules/quickedit/src/Ajax/BaseCommand.php +++ b/core/lib/Drupal/Core/Ajax/BaseCommand.php @@ -2,15 +2,13 @@ /** * @file - * Contains \Drupal\quickedit\Ajax\BaseCommand. + * Contains \Drupal\Core\Ajax\BaseCommand. */ -namespace Drupal\quickedit\Ajax; - -use Drupal\Core\Ajax\CommandInterface; +namespace Drupal\Core\Ajax; /** - * Base command that only exists to simplify Quick Edit's actual AJAX commands. + * Base command that only exists to simplify AJAX commands. */ class BaseCommand implements CommandInterface { diff --git a/core/modules/editor/src/Ajax/GetUntransformedTextCommand.php b/core/modules/editor/src/Ajax/GetUntransformedTextCommand.php index 3465729603a7..6a48f01be51e 100644 --- a/core/modules/editor/src/Ajax/GetUntransformedTextCommand.php +++ b/core/modules/editor/src/Ajax/GetUntransformedTextCommand.php @@ -7,8 +7,7 @@ namespace Drupal\editor\Ajax; -use Drupal\Core\Ajax\CommandInterface; -use Drupal\quickedit\Ajax\BaseCommand; +use Drupal\Core\Ajax\BaseCommand; /** * AJAX command to rerender a formatted text field without any transformation diff --git a/core/modules/quickedit/src/Ajax/EntitySavedCommand.php b/core/modules/quickedit/src/Ajax/EntitySavedCommand.php index cf7ad18ad157..d64f862b2a7e 100644 --- a/core/modules/quickedit/src/Ajax/EntitySavedCommand.php +++ b/core/modules/quickedit/src/Ajax/EntitySavedCommand.php @@ -7,6 +7,8 @@ namespace Drupal\quickedit\Ajax; +use Drupal\Core\Ajax\BaseCommand; + /** * AJAX command to indicate the entity was loaded from PrivateTempStore and * saved into the database. diff --git a/core/modules/quickedit/src/Ajax/FieldFormCommand.php b/core/modules/quickedit/src/Ajax/FieldFormCommand.php index 56d1e9e0b572..33ee011efd64 100644 --- a/core/modules/quickedit/src/Ajax/FieldFormCommand.php +++ b/core/modules/quickedit/src/Ajax/FieldFormCommand.php @@ -7,6 +7,8 @@ namespace Drupal\quickedit\Ajax; +use Drupal\Core\Ajax\BaseCommand; + /** * AJAX command for passing a rendered field form to Quick Edit's JavaScript * app. diff --git a/core/modules/quickedit/src/Ajax/FieldFormSavedCommand.php b/core/modules/quickedit/src/Ajax/FieldFormSavedCommand.php index f0dc38646afd..14ac51f6359c 100644 --- a/core/modules/quickedit/src/Ajax/FieldFormSavedCommand.php +++ b/core/modules/quickedit/src/Ajax/FieldFormSavedCommand.php @@ -7,6 +7,8 @@ namespace Drupal\quickedit\Ajax; +use Drupal\Core\Ajax\BaseCommand; + /** * AJAX command to indicate a field was saved into PrivateTempStore without * validation errors and pass the rerendered field to Quick Edit's JavaScript diff --git a/core/modules/quickedit/src/Ajax/FieldFormValidationErrorsCommand.php b/core/modules/quickedit/src/Ajax/FieldFormValidationErrorsCommand.php index 8d024ea66727..4e42ee5629f6 100644 --- a/core/modules/quickedit/src/Ajax/FieldFormValidationErrorsCommand.php +++ b/core/modules/quickedit/src/Ajax/FieldFormValidationErrorsCommand.php @@ -7,6 +7,8 @@ namespace Drupal\quickedit\Ajax; +use Drupal\Core\Ajax\BaseCommand; + /** * AJAX command to indicate a field form was attempted to be saved but failed * validation and pass the validation errors. -- GitLab