本文整理汇总了PHP中Menu::unsetAttributes方法的典型用法代码示例。如果您正苦于以下问题:PHP Menu::unsetAttributes方法的具体用法?PHP Menu::unsetAttributes怎么用?PHP Menu::unsetAttributes使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Menu
的用法示例。
在下文中一共展示了Menu::unsetAttributes方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: actionManage
public function actionManage()
{
$model = new Menu(ActiveRecord::SCENARIO_SEARCH);
$model->unsetAttributes();
if (isset($_GET['Menu'])) {
$model->attributes = $_GET['Menu'];
}
$this->render('manage', ['model' => $model]);
}
示例2: actionIndex
/**
* Lists all models.
*/
public function actionIndex()
{
$model = new Menu('search');
$model->unsetAttributes();
if (isset($_GET['Menu'])) {
$model->attributes = $_GET['Menu'];
}
$this->render('index', array('model' => $model));
}
示例3: actionIndex
/**
* Lists all models.
*/
public function actionIndex()
{
$this->addToolbar();
$model = new Menu('search');
$model->unsetAttributes();
// clear any default values
if (isset($_GET['Menu'])) {
$model->attributes = $_GET['Menu'];
}
$this->render('index', array('model' => $model));
}
示例4: actionAdmin
public function actionAdmin()
{
$lang = $this->getLanguageCode();
$listMenuIds = MenuType::model()->findAll();
$menutype_id = empty($listMenuIds) ? NULL : $listMenuIds[0]['id'];
if (Yii::app()->request->getParam('id')) {
$menutype_id = Yii::app()->request->getParam('id');
}
$model = new Menu();
$model->unsetAttributes();
$listMenu = $model->getListMenu($lang, $menutype_id);
$tree = Yii::app()->extraFunctions->parseTree($listMenu);
$this->render('admin', array('tree' => json_encode($tree), 'listMenuId' => $listMenuIds, 'menutype_id' => $menutype_id));
}
示例5: actionAdmin
/**
* Manages all models.
*/
public function actionAdmin()
{
Yii::app()->bootstrap->registerJS();
Yii::app()->bootstrap->registerJSBackend();
$model = new Menu('search');
$model->unsetAttributes();
// clear any default values
if (isset($_GET['Menu'])) {
$model->attributes = $_GET['Menu'];
}
//phan trang dang dropdown
if (isset($_GET['pageSize'])) {
Yii::app()->user->setState('pageSize', (int) $_GET['pageSize']);
unset($_GET['pageSize']);
}
$this->render('admin', array('model' => $model));
}
示例6: actionIndex
/**
* Управление блогами.
*
* @return void
*/
public function actionIndex()
{
$model = new Menu('search');
$model->unsetAttributes();
// clear any default values
$model->setAttributes(Yii::app()->getRequest()->getParam('Menu', []));
$this->render('index', ['model' => $model]);
}
示例7: actionAdmin
/**
* Manages all models.
*/
public function actionAdmin()
{
$model = new Menu('search');
$menulist = Menu::getDropList(0);
$model->unsetAttributes();
// clear any default values
if (isset($_GET['Menu'])) {
$model->attributes = $_GET['Menu'];
}
$this->render('admin', array('model' => $model, 'menulist' => $menulist));
}
示例8: actionExport
public function actionExport()
{
$model = new Menu();
$model->unsetAttributes();
// clear any default values
if (isset($_POST['Menu'])) {
$model->attributes = $_POST['Menu'];
}
$exportType = $_POST['fileType'];
$this->widget('ext.heart.export.EHeartExport', array('title' => 'List of Menu', 'dataProvider' => $model->search(), 'filter' => $model, 'grid_mode' => 'export', 'exportType' => $exportType, 'columns' => array('menu_id', 'just_id', 'type')));
}