@@ 303-309 (lines=7) @@ | ||
300 | // ストアからインストールしたプラグインは依存プラグインが有効化されているかを確認 |
|
301 | if ($Plugin->getSource()) { |
|
302 | $requires = $this->pluginService->getPluginRequired($Plugin); |
|
303 | $requires = array_filter($requires, function ($req) { |
|
304 | $code = preg_replace('/^ec-cube\//', '', $req['name']); |
|
305 | /** @var Plugin $DependPlugin */ |
|
306 | $DependPlugin = $this->pluginRepository->findOneBy(['code' => $code]); |
|
307 | ||
308 | return $DependPlugin->isEnabled() == false; |
|
309 | }); |
|
310 | if (!empty($requires)) { |
|
311 | $names = array_map(function ($req) { |
|
312 | return "「${req['description']}」"; |
@@ 209-215 (lines=7) @@ | ||
206 | if (isset($config['source']) && $config['source']) { |
|
207 | // 依存プラグインが有効になっていない場合はエラー |
|
208 | $requires = $this->getPluginRequired($config); |
|
209 | $notInstalledOrDisabled = array_filter($requires, function ($req) { |
|
210 | $code = preg_replace('/^ec-cube\//', '', $req['name']); |
|
211 | /** @var Plugin $DependPlugin */ |
|
212 | $DependPlugin = $this->pluginRepository->findOneBy(['code' => $code]); |
|
213 | ||
214 | return $DependPlugin ? $DependPlugin->isEnabled() == false : true; |
|
215 | }); |
|
216 | ||
217 | if (!empty($notInstalledOrDisabled)) { |
|
218 | $names = array_map(function ($p) { return $p['name']; }, $notInstalledOrDisabled); |