@@ 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); |
@@ 273-279 (lines=7) @@ | ||
270 | // ストアからインストールしたプラグインは依存プラグインが有効化されているかを確認 |
|
271 | if ($Plugin->getSource()) { |
|
272 | $requires = $this->pluginService->getPluginRequired($Plugin); |
|
273 | $requires = array_filter($requires, function ($req) { |
|
274 | $code = preg_replace('/^ec-cube\//', '', $req['name']); |
|
275 | /** @var Plugin $DependPlugin */ |
|
276 | $DependPlugin = $this->pluginRepository->findOneBy(['code' => $code]); |
|
277 | ||
278 | return $DependPlugin->isEnabled() == false; |
|
279 | }); |
|
280 | if (!empty($requires)) { |
|
281 | $names = array_map(function ($req) { |
|
282 | return "「${req['description']}」"; |