implement registration in backend
This commit is contained in:
@@ -2,10 +2,7 @@
|
||||
namespace backend\components;
|
||||
|
||||
use Yii;
|
||||
use common\models\Order;
|
||||
use yii\helpers\Html;
|
||||
use common\components\RoleDefinition;
|
||||
use common\components\Helper;
|
||||
|
||||
class AdminMenuStructure{
|
||||
|
||||
@@ -23,12 +20,12 @@ class AdminMenuStructure{
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
protected function addUserMainMenu(){
|
||||
|
||||
|
||||
/**
|
||||
* @throws \yii\base\InvalidConfigException
|
||||
*/
|
||||
protected function addUserMainMenu(){
|
||||
|
||||
$userMainMenu = null;
|
||||
$items = [];
|
||||
@@ -173,7 +170,6 @@ class AdminMenuStructure{
|
||||
$items[] = ['label' => 'Termek', 'url' => ['/room' ] ];
|
||||
$items[] = ['label' => 'Esemény típusok', 'url' => ['/event-type' ] ];
|
||||
$items[] = ['label' => 'Események', 'url' => ['/event' ] ];
|
||||
$items[] = ['label' => 'Esemény regisztrációk', 'url' => ['/event-registration' ] ];
|
||||
$this->menuItems[] = ['label' => 'Csoportos edzés', 'url' => $this->emptyUrl,
|
||||
'items' => $items
|
||||
];
|
||||
@@ -199,7 +195,8 @@ class AdminMenuStructure{
|
||||
if (Yii::$app->user->isGuest) {
|
||||
$mainMenuItem= ['label' => Yii::t('common/site','Login'), 'url' => ['/site/login']];
|
||||
} else {
|
||||
$mainMenuItem= [
|
||||
/** @noinspection PhpUndefinedFieldInspection */
|
||||
$mainMenuItem= [
|
||||
'label' => Yii::t('common/site','Logout') . '(' . Yii::$app->user->identity->username . ')',
|
||||
'url' => ['/site/logout'],
|
||||
'linkOptions' => ['data-method' => 'post']
|
||||
@@ -207,9 +204,13 @@ class AdminMenuStructure{
|
||||
}
|
||||
$this->menuItems[] = $mainMenuItem;
|
||||
}
|
||||
|
||||
|
||||
public function run(){
|
||||
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @throws \yii\base\InvalidConfigException
|
||||
*/
|
||||
public function run(){
|
||||
$this->addUserMainMenu();
|
||||
// $this->addLoginMainMenu();
|
||||
return $this->menuItems;
|
||||
|
||||
Reference in New Issue
Block a user