for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Domain plugin for HiPanel
*
* @link https://github.com/hiqdev/hipanel-module-domain
* @package hipanel-module-domain
* @license BSD-3-Clause
* @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
*/
namespace hipanel\modules\ticket\menus;
use hipanel\modules\dashboard\DashboardInterface;
use Yii;
class DashboardItem extends \hiqdev\yii2\menus\Menu
{
protected $dashboard;
public function __construct(DashboardInterface $dashboard, $config = [])
$this->dashboard = $dashboard;
parent::__construct($config);
}
public function items()
return [
'tickets' => [
'label' => $this->render('dashboardItem', $this->dashboard->mget(['totalCount','model'])),
'encode' => false,
'visible' => Yii::$app->user->can('ticket.read'),
],
];