Download .zip |
Info | Documentation | View files (4) | Download .zip | Reputation | Support forum | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2019-01-10 (2 months ago) | Not yet rated by the users | Total: 119 | All time: 8,972 This week: 478 |
Version | License | PHP version | Categories | |||
yii2-panel 1.0.0 | Freeware | 7 | PHP 5, Libraries, Content management |
Description | Author | ||||||||||||||
This package provides a controller and widget to use with the YII2 framework to display a dashboard panel. Innovation Award |
|
Simply dashboard solution. Each dashboard panel define in controller identicaly as Yii page: * in behaviors can control access - panel display only for users, who has access * create action. Can use parameters also * create view folder in same folder, where all other controller views
{
"require": {
"unyii2/yii2-panel": "dev-master"
}
}
Or
$ composer require unyii2/yii2-panel "dev-master"
echo \unyii2\yii2panel\PanelWidget::widget([
'name' => 'exportSettings',
'params' => [
'docId' => 777
]
]);
'invoices' => [
'class' => 'd3modules\d3invoices\Module',
'panels' => [
'exportSettings' =>
[
[
'route' => 'd3accexport/invoice-panel/document-settings',
'params' => [
'docId' => 13
]
]
]
],
],
Standard view path: d3modules/d3accexport/views/invoice-panel/setting_grid.php
<?php
namespace d3modules\d3accexport\controllers;
use unyii2\yii2panel\Controller;
use yii\filters\AccessControl;
class InvoicePanelController extends Controller
{
/
* @inheritdoc
*/
public function behaviors()
{
return [
'access' => [
'class' => AccessControl::className(),
'rules' => [
[
'allow' => true,
'actions' => [
'document-settings',
],
'roles' => [
'DocSetting',
],
],
],
],
];
}
public function actionDocumentSettings()
{
return $this->render('setting_grid',[]);
}
}
Files |
File | Role | Description | ||
---|---|---|---|---|
src (2 files) | ||||
composer.json | Data | Auxiliary data | ||
README.md | Doc. | Documentation |
Files | / | src |
File | Role | Description |
---|---|---|
Controller.php | Class | Class source |
PanelWidget.php | Class | Class source |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.