Recommend this page to a friend! |
Download |
Info | Documentation | Files | Install with Composer | Download | Reputation | Support forum | Blog | Links |
Ratings | Unique User Downloads | Download Rankings | ||||
Not yet rated by the users | Total: 137 | All time: 9,252 This week: 673 |
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 (4) |
File | Role | Description | ||
---|---|---|---|---|
src (2 files) | ||||
composer.json | Data | Auxiliary data | ||
README.md | Doc. | Documentation |
Files (4) | / | src |
File | Role | Description |
---|---|---|
Controller.php | Class | Class source |
PanelWidget.php | Class | Class source |
The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
Install with Composer |
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.