diff --git a/libraries.services.yml b/libraries.services.yml index 18d36cabf84bd236a5cd8b7b66a0e33a6b5c35e5..d331c675f9baa2451f56183c58128695232d4bc1 100644 --- a/libraries.services.yml +++ b/libraries.services.yml @@ -10,7 +10,7 @@ services: arguments: ['@serialization.yaml'] plugin.manager.libraries.library_type: - class: Drupal\libraries\ExternalLibrary\LibraryType\LibraryTypeFactory + class: Drupal\libraries\ExternalLibrary\Type\LibraryTypeFactory parent: default_plugin_manager plugin.manager.libraries.locator: class: Drupal\libraries\ExternalLibrary\Local\LocatorManager diff --git a/src/ExternalLibrary/LibraryManager.php b/src/ExternalLibrary/LibraryManager.php index 6cfef1db04c624e14d12a9128bbf722bd95aee09..4f7062d5d0c631c20b9d9b81973d505c611d7764 100644 --- a/src/ExternalLibrary/LibraryManager.php +++ b/src/ExternalLibrary/LibraryManager.php @@ -9,8 +9,8 @@ namespace Drupal\libraries\ExternalLibrary; use Drupal\Component\Plugin\Factory\FactoryInterface; use Drupal\libraries\Extension\ExtensionHandlerInterface; use Drupal\libraries\ExternalLibrary\Exception\LibraryTypeNotFoundException; -use Drupal\libraries\ExternalLibrary\LibraryType\LibraryCreationListenerInterface; -use Drupal\libraries\ExternalLibrary\LibraryType\LibraryLoadingListenerInterface; +use Drupal\libraries\ExternalLibrary\Type\LibraryCreationListenerInterface; +use Drupal\libraries\ExternalLibrary\Type\LibraryLoadingListenerInterface; use Drupal\libraries\ExternalLibrary\Definition\DefinitionDiscoveryInterface; /** diff --git a/src/ExternalLibrary/LibraryType/LibraryCreationListenerInterface.php b/src/ExternalLibrary/Type/LibraryCreationListenerInterface.php similarity index 72% rename from src/ExternalLibrary/LibraryType/LibraryCreationListenerInterface.php rename to src/ExternalLibrary/Type/LibraryCreationListenerInterface.php index 252efd4b3ec957ece1c8980b766720c3b9a2f550..031e505f399f468a8cb3e12296c67b7ad5ba20c1 100644 --- a/src/ExternalLibrary/LibraryType/LibraryCreationListenerInterface.php +++ b/src/ExternalLibrary/Type/LibraryCreationListenerInterface.php @@ -1,11 +1,6 @@ <?php -/** - * @file - * Contains \Drupal\libraries\ExternalLibrary\LibraryType\LibraryCreationListenerInterface. - */ - -namespace Drupal\libraries\ExternalLibrary\LibraryType; +namespace Drupal\libraries\ExternalLibrary\Type; use Drupal\libraries\ExternalLibrary\LibraryInterface; diff --git a/src/ExternalLibrary/LibraryType/LibraryLoadingListenerInterface.php b/src/ExternalLibrary/Type/LibraryLoadingListenerInterface.php similarity index 72% rename from src/ExternalLibrary/LibraryType/LibraryLoadingListenerInterface.php rename to src/ExternalLibrary/Type/LibraryLoadingListenerInterface.php index dc3dfbe00bbe175f202937e6ba4aa170f276066c..8ab4e1adf6f452c3950ff542251ca0fa1502378d 100644 --- a/src/ExternalLibrary/LibraryType/LibraryLoadingListenerInterface.php +++ b/src/ExternalLibrary/Type/LibraryLoadingListenerInterface.php @@ -1,11 +1,6 @@ <?php -/** - * @file - * Contains \Drupal\libraries\ExternalLibrary\LibraryType\LibraryLoadingListenerInterface. - */ - -namespace Drupal\libraries\ExternalLibrary\LibraryType; +namespace Drupal\libraries\ExternalLibrary\Type; use Drupal\libraries\ExternalLibrary\LibraryInterface; diff --git a/src/ExternalLibrary/LibraryType/LibraryTypeFactory.php b/src/ExternalLibrary/Type/LibraryTypeFactory.php similarity index 85% rename from src/ExternalLibrary/LibraryType/LibraryTypeFactory.php rename to src/ExternalLibrary/Type/LibraryTypeFactory.php index dff4668b9d31843401e1e04128f000692f45de83..cc12adb9544cb86cb222ff76171a4a33e5e475ca 100644 --- a/src/ExternalLibrary/LibraryType/LibraryTypeFactory.php +++ b/src/ExternalLibrary/Type/LibraryTypeFactory.php @@ -1,6 +1,6 @@ <?php -namespace Drupal\libraries\ExternalLibrary\LibraryType; +namespace Drupal\libraries\ExternalLibrary\Type; use Drupal\Component\Plugin\Factory\FactoryInterface; use Drupal\Core\Cache\CacheBackendInterface; @@ -25,7 +25,7 @@ class LibraryTypeFactory extends DefaultPluginManager { * The module handler to invoke the alter hook with. */ public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) { - parent::__construct('Plugin/libraries/LibraryType', $namespaces, $module_handler, LibraryTypeInterface::class, LibraryType::class); + parent::__construct('Plugin/libraries/Type', $namespaces, $module_handler, LibraryTypeInterface::class, LibraryType::class); // @todo Document this hook. $this->alterInfo('libraries_library_type_info'); $this->setCacheBackend($cache_backend, 'libraries_library_type_info'); diff --git a/src/ExternalLibrary/LibraryType/LibraryTypeInterface.php b/src/ExternalLibrary/Type/LibraryTypeInterface.php similarity index 77% rename from src/ExternalLibrary/LibraryType/LibraryTypeInterface.php rename to src/ExternalLibrary/Type/LibraryTypeInterface.php index 87ecfe5894ef38b3a548dc6ebc746b2f5a1319bc..fba127ffd9a67cbcd6c9f38ee2af0f5b80b9e3d3 100644 --- a/src/ExternalLibrary/LibraryType/LibraryTypeInterface.php +++ b/src/ExternalLibrary/Type/LibraryTypeInterface.php @@ -1,12 +1,6 @@ <?php -/** - * @file - * Contains \Drupal\libraries\ExternalLibrary\LibraryType\LibraryTypeInterface. - */ - -namespace Drupal\libraries\ExternalLibrary\LibraryType; - +namespace Drupal\libraries\ExternalLibrary\Type; /** * Provides an interface for library types. diff --git a/src/Plugin/libraries/LibraryType/AssetLibraryType.php b/src/Plugin/libraries/Type/AssetLibraryType.php similarity index 89% rename from src/Plugin/libraries/LibraryType/AssetLibraryType.php rename to src/Plugin/libraries/Type/AssetLibraryType.php index ac5c3c9941d2658f0b00a4c22727801d90304abb..b2dbed91c5b8cbe502d3c7465fc5e72944f91070 100644 --- a/src/Plugin/libraries/LibraryType/AssetLibraryType.php +++ b/src/Plugin/libraries/Type/AssetLibraryType.php @@ -1,18 +1,13 @@ <?php -/** - * @file - * Contains \Drupal\libraries\Plugin\libraries\LibraryType\AssetLibraryType. - */ - -namespace Drupal\libraries\Plugin\libraries\LibraryType; +namespace Drupal\libraries\Plugin\libraries\Type; use Drupal\Component\Plugin\Factory\FactoryInterface; use Drupal\Core\Plugin\ContainerFactoryPluginInterface; use Drupal\libraries\ExternalLibrary\Asset\AssetLibrary; use Drupal\libraries\ExternalLibrary\LibraryInterface; -use Drupal\libraries\ExternalLibrary\LibraryType\LibraryCreationListenerInterface; -use Drupal\libraries\ExternalLibrary\LibraryType\LibraryTypeInterface; +use Drupal\libraries\ExternalLibrary\Type\LibraryCreationListenerInterface; +use Drupal\libraries\ExternalLibrary\Type\LibraryTypeInterface; use Drupal\libraries\ExternalLibrary\Local\LocalLibraryInterface; use Drupal\libraries\ExternalLibrary\Utility\IdAccessorTrait; use Drupal\libraries\ExternalLibrary\Version\VersionedLibraryInterface; diff --git a/src/Plugin/libraries/LibraryType/PhpFileLibraryType.php b/src/Plugin/libraries/Type/PhpFileLibraryType.php similarity index 89% rename from src/Plugin/libraries/LibraryType/PhpFileLibraryType.php rename to src/Plugin/libraries/Type/PhpFileLibraryType.php index 0575e9c1386ef3f8c614a30e414db7d0cca06d0a..61ccf2528841519d6a5e04a95af594fbc0ae13d1 100644 --- a/src/Plugin/libraries/LibraryType/PhpFileLibraryType.php +++ b/src/Plugin/libraries/Type/PhpFileLibraryType.php @@ -1,18 +1,13 @@ <?php -/** - * @file - * Contains \Drupal\libraries\Plugin\libraries\LibraryType\PhpFileLibraryType. - */ - -namespace Drupal\libraries\Plugin\libraries\LibraryType; +namespace Drupal\libraries\Plugin\libraries\Type; use Drupal\Component\Plugin\Factory\FactoryInterface; use Drupal\Core\Plugin\ContainerFactoryPluginInterface; use Drupal\libraries\ExternalLibrary\LibraryInterface; -use Drupal\libraries\ExternalLibrary\LibraryType\LibraryCreationListenerInterface; -use Drupal\libraries\ExternalLibrary\LibraryType\LibraryLoadingListenerInterface; -use Drupal\libraries\ExternalLibrary\LibraryType\LibraryTypeInterface; +use Drupal\libraries\ExternalLibrary\Type\LibraryCreationListenerInterface; +use Drupal\libraries\ExternalLibrary\Type\LibraryLoadingListenerInterface; +use Drupal\libraries\ExternalLibrary\Type\LibraryTypeInterface; use Drupal\libraries\ExternalLibrary\PhpFile\PhpFileLibrary; use Drupal\libraries\ExternalLibrary\PhpFile\PhpFileLoaderInterface; use Drupal\libraries\ExternalLibrary\Utility\IdAccessorTrait;