You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
558 B
29 lines
558 B
7 years ago
|
<?php
|
||
|
/**
|
||
|
* Created by Error202
|
||
|
* Date: 10.07.2018
|
||
|
*/
|
||
|
|
||
|
namespace common\modules\pages\widgets;
|
||
|
|
||
|
use core\forms\menu\MenuItemForm;
|
||
|
use yii\base\Widget;
|
||
|
|
||
|
class MenuItemCreatorWidget extends Widget
|
||
|
{
|
||
|
public $menu_id;
|
||
|
|
||
|
public function run()
|
||
|
{
|
||
|
$form = new MenuItemForm();
|
||
|
$form->module = \Yii::t('page', 'Pages');
|
||
|
$form->name = \Yii::t('page', 'Pages');
|
||
|
$form->title_attr = \Yii::t('page', 'Pages');
|
||
|
$form->menu_id = $this->menu_id;
|
||
|
$form->url = '/pages/page/index';
|
||
|
|
||
|
return $this->render('menu-item/creator', [
|
||
|
'model' => $form,
|
||
|
]);
|
||
|
}
|
||
|
}
|