Skip to content

Commit

Permalink
make plugin work with shopware composer setup
Browse files Browse the repository at this point in the history
Signed-off-by: Jonas Döbertin <hello@jd-powered.net>
  • Loading branch information
JonasDoebertin committed Apr 3, 2019
1 parent 3e1a35b commit af50861
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 af50861

Please sign in to comment.