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