|
|
|
|
|
|
|
|
use common\logic\User\User\Module\UserModule; |
|
|
use common\logic\User\User\Module\UserModule; |
|
|
use yii\helpers\Html; |
|
|
use yii\helpers\Html; |
|
|
use yii\bootstrap\Nav; |
|
|
use yii\bootstrap\Nav; |
|
|
use common\logic\Producer\Producer\Model\Producer; |
|
|
|
|
|
|
|
|
|
|
|
\common\assets\CommonAsset::register($this); |
|
|
\common\assets\CommonAsset::register($this); |
|
|
\frontend\assets\AppAsset::register($this); |
|
|
\frontend\assets\AppAsset::register($this); |
|
|
|
|
|
|
|
|
$userCurrent = GlobalParam::getCurrentUser(); |
|
|
$userCurrent = GlobalParam::getCurrentUser(); |
|
|
$isUserCurrentGrantedAsProducer = $userModule->getAuthorizationChecker()->isGrantedAsProducer($userCurrent); |
|
|
$isUserCurrentGrantedAsProducer = $userModule->getAuthorizationChecker()->isGrantedAsProducer($userCurrent); |
|
|
$isHome = (Yii::$app->controller->id == 'site' && \Yii::$app->controller->action->id == 'index'); |
|
|
$isHome = (Yii::$app->controller->id == 'site' && \Yii::$app->controller->action->id == 'index'); |
|
|
$producer = null; |
|
|
|
|
|
if ($isUserCurrentGrantedAsProducer) { |
|
|
|
|
|
$producer = Producer::searchOne(['id' => \Yii::$app->user->identity->id_producer]); |
|
|
|
|
|
} |
|
|
|
|
|
$settingModule = SettingModule::getInstance(); |
|
|
$settingModule = SettingModule::getInstance(); |
|
|
$adminSettingBag = $settingModule->getAdminSettingBag(); |
|
|
$adminSettingBag = $settingModule->getAdminSettingBag(); |
|
|
|
|
|
|