@@ -42,8 +42,7 @@ |
||
42 | 42 | ]); |
43 | 43 | |
44 | 44 | foreach ($modules as $module) { |
45 | - $navigation = json_decode(file_get_contents($this->get("ribs_admin.globals")->getBaseBundlePath |
|
46 | - ($module->getPackageName(), $module->getDevMode()) . "/Resources/json/navigation.json"), true); |
|
45 | + $navigation = json_decode(file_get_contents($this->get("ribs_admin.globals")->getBaseBundlePath($module->getPackageName(), $module->getDevMode()) . "/Resources/json/navigation.json"), true); |
|
47 | 46 | |
48 | 47 | foreach ($navigation["items"] as $item) { |
49 | 48 | if ($this->get("ribs_admin.acess_rights")->testRight($item["right"])) { |
@@ -11,11 +11,11 @@ discard block |
||
11 | 11 | */ |
12 | 12 | private $container; |
13 | 13 | |
14 | - /** |
|
15 | - * Globals constructor. |
|
16 | - * @param ContainerInterface $container |
|
17 | - */ |
|
18 | - public function __construct(ContainerInterface $container) |
|
14 | + /** |
|
15 | + * Globals constructor. |
|
16 | + * @param ContainerInterface $container |
|
17 | + */ |
|
18 | + public function __construct(ContainerInterface $container) |
|
19 | 19 | { |
20 | 20 | $this->container = $container; |
21 | 21 | } |
@@ -38,18 +38,18 @@ discard block |
||
38 | 38 | return $package_name; |
39 | 39 | } |
40 | 40 | |
41 | - /** |
|
42 | - * this method send base bundle path related to ribs-admin |
|
43 | - * @param string|null $package |
|
44 | - * @param bool $dev_mode |
|
45 | - * @return string |
|
46 | - */ |
|
41 | + /** |
|
42 | + * this method send base bundle path related to ribs-admin |
|
43 | + * @param string|null $package |
|
44 | + * @param bool $dev_mode |
|
45 | + * @return string |
|
46 | + */ |
|
47 | 47 | public function getBaseBundlePath(string $package = "piou-piou/ribs-admin-bundle", bool $dev_mode = false): string |
48 | 48 | { |
49 | 49 | $path = explode("/", __DIR__); |
50 | 50 | array_pop($path); |
51 | 51 | |
52 | - $dev_mode = $package === "piou-piou/ribs-admin-bundle" ? $this->container->getParameter("ribs_admin")["dev_mode"] : $dev_mode; |
|
52 | + $dev_mode = $package === "piou-piou/ribs-admin-bundle" ? $this->container->getParameter("ribs_admin")["dev_mode"] : $dev_mode; |
|
53 | 53 | |
54 | 54 | if ($dev_mode === true) { |
55 | 55 | $package = "lib/".$this->getPackageDevName($package); |
@@ -52,9 +52,9 @@ |
||
52 | 52 | $dev_mode = $package === "piou-piou/ribs-admin-bundle" ? $this->container->getParameter("ribs_admin")["dev_mode"] : $dev_mode; |
53 | 53 | |
54 | 54 | if ($dev_mode === true) { |
55 | - $package = "lib/".$this->getPackageDevName($package); |
|
55 | + $package = "lib/" . $this->getPackageDevName($package); |
|
56 | 56 | } |
57 | 57 | |
58 | - return implode("/", $path)."/../../" . $package; |
|
58 | + return implode("/", $path) . "/../../" . $package; |
|
59 | 59 | } |
60 | 60 | } |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | foreach ($modules as $module) { |
37 | 37 | $modules_data[] = [ |
38 | 38 | "name" => $module->getTitle(), |
39 | - "rights" => (array)json_decode(file_get_contents($this->globals->getBaseBundlePath($module->getPackageName(), $module->getDevMode()) . "/Resources/json/ribsadmin_rights.json")) |
|
39 | + "rights" => (array) json_decode(file_get_contents($this->globals->getBaseBundlePath($module->getPackageName(), $module->getDevMode()) . "/Resources/json/ribsadmin_rights.json")) |
|
40 | 40 | ]; |
41 | 41 | } |
42 | 42 | |
@@ -59,6 +59,6 @@ discard block |
||
59 | 59 | $rights[] = json_decode(file_get_contents($this->globals->getBaseBundlePath($module->getPackageName(), $module->getDevMode()) . "/Resources/json/ribsadmin_rights.json")); |
60 | 60 | } |
61 | 61 | |
62 | - return (object)$rights; |
|
62 | + return (object) $rights; |
|
63 | 63 | } |
64 | 64 | } |