Skip to content

Commit 72c1c23

Browse files
committed
Update Module.php
1 parent 4daea28 commit 72c1c23

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/Module.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,7 @@ class Module extends BaseController
2424
*/
2525
public function __construct()
2626
{
27-
// Init configuration
2827
$this->initConfig();
29-
30-
// Load modules
3128
$this->loadModules();
3229
}
3330

@@ -38,7 +35,7 @@ public function __construct()
3835
* @param string $role
3936
* @return bool
4037
*/
41-
public function hasPermissions(?string $role = null) : bool
38+
public function hasPermissions($role = false) : bool
4239
{
4340
if ( $this->isPermissions() ) {
4441
if ( $role ) {
@@ -78,7 +75,7 @@ public function getModulesRoutes() : mixed
7875
* @param string $hook
7976
* @return void
8077
*/
81-
protected function addJS(string $path, string $hook = 'add-js') : void
78+
protected function addJS(string $path, string $hook = 'js') : void
8279
{
8380
$this->addAction($hook, function () use ($path) : void {
8481
$file = $this->applyFilter('module-view-js', 'system/js');
@@ -94,7 +91,7 @@ protected function addJS(string $path, string $hook = 'add-js') : void
9491
* @param string $hook
9592
* @return void
9693
*/
97-
protected function addCSS(string $path, string $hook = 'add-css') : void
94+
protected function addCSS(string $path, string $hook = 'css') : void
9895
{
9996
$this->addAction($hook, function () use ($path) : void {
10097
$file = $this->applyFilter('module-view-css', 'system/css');

0 commit comments

Comments
 (0)