|
|
|
|
|
|
|
|
{ |
|
|
{ |
|
|
public function behaviors() |
|
|
public function behaviors() |
|
|
{ |
|
|
{ |
|
|
return [ |
|
|
|
|
|
'access' => [ |
|
|
|
|
|
'class' => AccessControl::class, |
|
|
|
|
|
'rules' => [ |
|
|
|
|
|
[ |
|
|
|
|
|
'allow' => true, |
|
|
|
|
|
'roles' => ['@'] |
|
|
|
|
|
] |
|
|
|
|
|
], |
|
|
|
|
|
], |
|
|
|
|
|
]; |
|
|
|
|
|
|
|
|
return []; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public function actionIndex() |
|
|
public function actionIndex() |
|
|
{ |
|
|
{ |
|
|
|
|
|
if(!$this->getUserCurrent()) { |
|
|
|
|
|
return $this->redirectProducerLoginFrontend('index'); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
return $this->render('index', [ |
|
|
return $this->render('index', [ |
|
|
'user' => $this->getUserCurrent(), |
|
|
'user' => $this->getUserCurrent(), |
|
|
'producer' => $this->getProducerCurrent() |
|
|
'producer' => $this->getProducerCurrent() |