File tree Expand file tree Collapse file tree
modules/system/console/asset Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414
1515abstract class AssetCreate extends Command
1616{
17- protected const TYPE_THEME = 'theme ' ;
17+ protected const TYPE_MODULE = 'module ' ;
1818 protected const TYPE_PLUGIN = 'plugin ' ;
19+ protected const TYPE_THEME = 'theme ' ;
1920
2021 /**
2122 * @var string The console command description.
@@ -114,6 +115,17 @@ protected function getPackagePathType(string $package): array
114115 return [null , null ];
115116 }
116117
118+ if (str_starts_with ($ package , 'module- ' )) {
119+ if (
120+ ($ modulePath = base_path ('modules ' ) . '/ ' . str_after ($ package , 'module- ' ))
121+ && File::exists ($ modulePath )
122+ ) {
123+ return [$ modulePath , static ::TYPE_MODULE ];
124+ }
125+
126+ return [null , null ];
127+ }
128+
117129 if ($ plugin = PluginManager::instance ()->findByIdentifier ($ package )) {
118130 return [$ plugin ->getPluginPath (), static ::TYPE_PLUGIN ];
119131 }
You can’t perform that action at this time.
0 commit comments