Skip to content

Commit

Permalink
Merge pull request #6 from JonasDoebertin/composer-setup
Browse files Browse the repository at this point in the history
make plugin work with shopware composer setup
  • Loading branch information
shyim authored Apr 3, 2019
2 parents fd63406 + af50861 commit 7f6e33e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Controllers/Backend/Adminer.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ public function formAction()
$baseUrl = Shopware()->Front()->Router()->assemble(['controller' => 'index']);
$baseUrl = str_replace('/backend', '', $baseUrl);

$shopwarePath = Shopware()->Container()->getParameter('kernel.root_dir');
if (mb_substr($baseUrl, -1) !== '/') {
$baseUrl .= '/';
}

$shopwarePath = Shopware()->Container()->getParameter('shopware.app.rootdir');
$filePath = dirname(dirname(__DIR__));
$pathToPluginFolder = str_ireplace($shopwarePath, '', $filePath);

Expand Down

0 comments on commit 7f6e33e

Please sign in to comment.