| @@ 210-216 (lines=7) @@ | ||
| 207 | if (isset($config['source']) && $config['source']) { |
|
| 208 | // 依存プラグインが有効になっていない場合はエラー |
|
| 209 | $requires = $this->getPluginRequired($config); |
|
| 210 | $notInstalledOrDisabled = array_filter($requires, function ($req) { |
|
| 211 | $code = preg_replace('/^ec-cube\//', '', $req['name']); |
|
| 212 | /** @var Plugin $DependPlugin */ |
|
| 213 | $DependPlugin = $this->pluginRepository->findOneBy(['code' => $code]); |
|
| 214 | ||
| 215 | return $DependPlugin ? $DependPlugin->isEnabled() == false : true; |
|
| 216 | }); |
|
| 217 | ||
| 218 | if (!empty($notInstalledOrDisabled)) { |
|
| 219 | $names = array_map(function ($p) { return $p['name']; }, $notInstalledOrDisabled); |
|
| @@ 278-284 (lines=7) @@ | ||
| 275 | // ストアからインストールしたプラグインは依存プラグインが有効化されているかを確認 |
|
| 276 | if ($Plugin->getSource()) { |
|
| 277 | $requires = $this->pluginService->getPluginRequired($Plugin); |
|
| 278 | $requires = array_filter($requires, function ($req) { |
|
| 279 | $code = preg_replace('/^ec-cube\//', '', $req['name']); |
|
| 280 | /** @var Plugin $DependPlugin */ |
|
| 281 | $DependPlugin = $this->pluginRepository->findOneBy(['code' => $code]); |
|
| 282 | ||
| 283 | return $DependPlugin->isEnabled() == false; |
|
| 284 | }); |
|
| 285 | if (!empty($requires)) { |
|
| 286 | $names = array_map(function ($req) { |
|
| 287 | return "「${req['description']}」"; |
|