当前位置: 首页>>代码示例>>PHP>>正文


PHP Model_Category::getMenu方法代码示例

本文整理汇总了PHP中Model_Category::getMenu方法的典型用法代码示例。如果您正苦于以下问题:PHP Model_Category::getMenu方法的具体用法?PHP Model_Category::getMenu怎么用?PHP Model_Category::getMenu使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Model_Category的用法示例。


在下文中一共展示了Model_Category::getMenu方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: addAction

 /**
  * 增加商品
  *
  * @return boolean
  */
 public function addAction()
 {
     if ($this->isPost()) {
         $aData = $this->_checkData(1);
         if (empty($aData)) {
             return null;
         }
         $aData['iPublishStatus'] = 0;
         //发布需要将该字段改为1
         //增加需要加上当前添加人ID
         $aCurrUserInfo = $this->aCurrUser;
         $aData['iUpdateUserID'] = $aData['iCreateUserID'] = $aCurrUserInfo['iUserID'];
         $iGoodsID = Model_Goods::addData($aData);
         if ($iGoodsID > 0) {
             return $this->showMsg('商品添加成功!', true);
         } else {
             return $this->showMsg('商品添加失败!', false);
         }
     } else {
         $this->_response->setHeader('Access-Control-Allow-Origin', '*.*');
         $aTree = Model_Category::getMenu();
         $this->assign('aTree', $aTree);
         $this->assign('aUnlockType', $this->aUnlockType);
         $this->assign('aUnlockLevel', $this->aUnlockLevel);
         $this->assign('sUploadUrl', Yaf_G::getConf('upload', 'url'));
         $this->assign('sFileBaseUrl', 'http://' . Yaf_G::getConf('file', 'domain'));
     }
 }
开发者ID:nicevoice,项目名称:yhtx,代码行数:33,代码来源:Index.php

示例2: editAction

 public function editAction()
 {
     $aParam['iID'] = intval($this->getParam('id'));
     $aParam['iID1'] = intval($this->getParam('iID'));
     $aParam['sName'] = $this->getParam('sName');
     $aParam['iParentID'] = intval($this->getParam('iParentID'));
     if ($this->isPost()) {
         if ($aParam['iID'] != $aParam['iID1']) {
             $this->showMsg('非法操作', false);
         }
         unset($aParam['iID1']);
         $aParam['iUpdateUser'] = $this->aCurrUser['iUserID'];
         $aCategory = $this->_checkData($aParam);
         if (empty($aCategory)) {
             return null;
         }
         $aData = Model_Category::exsistCategory($aParam['sName'], $aParam['iParentID']);
         if (!empty($aData)) {
             return $this->showMsg('已存在该分类', false);
         }
         if (Model_Category::updData($aCategory)) {
             return $this->showMsg('分类修改成功', true);
         }
     } else {
         $aCategory = Model_Category::getDetail($aParam['iID']);
         if (empty($aCategory)) {
             $this->showMsg('该分类不存在', false);
         }
         $aData = Model_Category::getMenu();
         $this->assign('aCategory', $aCategory);
         $this->assign('aTree', $aData);
     }
 }
开发者ID:nicevoice,项目名称:yhtx,代码行数:33,代码来源:Category.php


注:本文中的Model_Category::getMenu方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。