| @@ 213-219 (lines=7) @@ | ||
| 210 | if (isset($config['source']) && $config['source']) { |
|
| 211 | // 依存プラグインが有効になっていない場合はエラー |
|
| 212 | $requires = $this->getPluginRequired($config); |
|
| 213 | $notInstalledOrDisabled = array_filter($requires, function ($req) { |
|
| 214 | $code = preg_replace('/^ec-cube\//', '', $req['name']); |
|
| 215 | /** @var Plugin $DependPlugin */ |
|
| 216 | $DependPlugin = $this->pluginRepository->findOneBy(['code' => $code]); |
|
| 217 | ||
| 218 | return $DependPlugin ? $DependPlugin->isEnabled() == false : true; |
|
| 219 | }); |
|
| 220 | ||
| 221 | if (!empty($notInstalledOrDisabled)) { |
|
| 222 | $names = array_map(function ($p) { return $p['name']; }, $notInstalledOrDisabled); |
|
| @@ 266-272 (lines=7) @@ | ||
| 263 | // ストアからインストールしたプラグインは依存プラグインが有効化されているかを確認 |
|
| 264 | if ($Plugin->getSource()) { |
|
| 265 | $requires = $this->pluginService->getPluginRequired($Plugin); |
|
| 266 | $requires = array_filter($requires, function ($req) { |
|
| 267 | $code = preg_replace('/^ec-cube\//', '', $req['name']); |
|
| 268 | /** @var Plugin $DependPlugin */ |
|
| 269 | $DependPlugin = $this->pluginRepository->findOneBy(['code' => $code]); |
|
| 270 | ||
| 271 | return $DependPlugin->isEnabled() == false; |
|
| 272 | }); |
|
| 273 | if (!empty($requires)) { |
|
| 274 | $names = array_map(function ($req) { |
|
| 275 | return "「${req['description']}」"; |
|