Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
namespace befound\ls\ModulePlugin; | ||
/** | ||
* Example plugin that can not be activated. | ||
*/ | ||
class ModulePlugin extends \ls\pluginmanager\PluginModule | ||
{ | ||
public $defaultController = 'dashboard'; | ||
public $controllerNamespace; | ||
|
||
public function __construct() { | ||
$this->controllerNamespace = __NAMESPACE__ . '\\controllers'; | ||
} | ||
} | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"name" : "ModulePlugin", | ||
"namespace" : "\\befound\\ls\\ModulePlugin", | ||
"description" : "Example plugin that uses a Yii module.", | ||
"type" : "module" | ||
} |
15 changes: 15 additions & 0 deletions
15
plugins/befound/ls/ModulePlugin/controllers/DashboardController.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
namespace befound\ls\ModulePlugin\controllers; | ||
use \ls\pluginmanager\PluginController; | ||
|
||
class DashboardController extends PluginController{ | ||
public function accessRules() { | ||
return array_merge([ | ||
['allow', 'roles' => ['superadmin']] | ||
|
||
], parent::accessRules()); | ||
} | ||
public function actionIndex() { | ||
echo 'nice'; | ||
} | ||
} |