5
5
namespace Drupal \acquia_cms_site_studio \Plugin \ConfigAction ;
6
6
7
7
use Drupal \cohesion \Controller \AdministrationController ;
8
- use Drupal \cohesion_sync \Services \PackageImportHandler ;
9
8
use Drupal \Component \Render \PlainTextOutput ;
10
9
use Drupal \Core \Config \Action \Attribute \ConfigAction ;
11
10
use Drupal \Core \Config \Action \ConfigActionPluginInterface ;
@@ -35,15 +34,12 @@ final class BasePackageImport implements ConfigActionPluginInterface, ContainerF
35
34
* The config factory.
36
35
* @param \Drupal\Core\Site\Settings $settings
37
36
* The settings.
38
- * @param \Drupal\cohesion_sync\Services\PackageImportHandler $packageImportHandler
39
- * The package import handler.
40
37
* @param \Drupal\Core\Extension\ModuleHandler $moduleHandler
41
38
* The module handler.
42
39
*/
43
40
public function __construct (
44
41
protected readonly ConfigFactoryInterface $ configFactory ,
45
42
protected readonly Settings $ settings ,
46
- protected readonly PackageImportHandler $ packageImportHandler ,
47
43
protected readonly ModuleHandler $ moduleHandler ,
48
44
) {
49
45
}
@@ -55,7 +51,6 @@ public static function create(ContainerInterface $container, array $configuratio
55
51
return new static (
56
52
$ container ->get ('config.factory ' ),
57
53
$ container ->get ('settings ' ),
58
- $ container ->get ('cohesion_sync.package_import_handler ' ),
59
54
$ container ->get ('module_handler ' ),
60
55
);
61
56
}
@@ -129,8 +124,6 @@ private function toPlainString(\Stringable|string $text): string {
129
124
*/
130
125
private function importBasePackages (): void {
131
126
$ this ->initializeBatch ();
132
- $ package_list_path = $ this ->getPackageListPath ();
133
- $ this ->importPackages ($ package_list_path );
134
127
$ this ->processBatchIfCli ();
135
128
}
136
129
@@ -141,27 +134,6 @@ private function initializeBatch(): void {
141
134
batch_set (AdministrationController::batchAction (TRUE ));
142
135
}
143
136
144
- /**
145
- * Gets the path to the package list file.
146
- *
147
- * @return string
148
- * The path to the package list file.
149
- */
150
- private function getPackageListPath (): string {
151
- $ module_path = $ this ->moduleHandler ->getModule ('acquia_cms_site_studio ' )->getPath ();
152
- return $ module_path . '/config/site_studio/site_studio.packages.yml ' ;
153
- }
154
-
155
- /**
156
- * Imports packages from the specified path.
157
- *
158
- * @param string $package_list_path
159
- * The path to the package list file.
160
- */
161
- private function importPackages (string $ package_list_path ): void {
162
- $ this ->packageImportHandler ->importPackagesFromPath ($ package_list_path );
163
- }
164
-
165
137
/**
166
138
* Processes the batch if running in CLI mode.
167
139
*/
0 commit comments