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


PHP common::setMenuVars方法代码示例

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


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

示例1: setMenu

 /**
  * Set the menu. 
  * 
  * @param  array $products 
  * @param  int   $productID 
  * @access public
  * @return void
  */
 public function setMenu($products, $productID)
 {
     $this->loadModel('product')->setMenu($products, $productID);
     $selectHtml = $this->product->select($products, $productID, 'testtask', 'browse');
     foreach ($this->lang->testtask->menu as $key => $value) {
         $replace = $key == 'product' ? $selectHtml : $productID;
         common::setMenuVars($this->lang->testtask->menu, $key, $replace);
     }
 }
开发者ID:huokedu,项目名称:zentao,代码行数:17,代码来源:model.php

示例2: setMenu

 /**
  * Set menu.
  * 
  * @param  array  $products 
  * @param  int    $productID 
  * @access public
  * @return void
  */
 public function setMenu($products, $productID, $branch = 0)
 {
     $this->loadModel('product')->setMenu($products, $productID, $branch);
     $selectHtml = $this->product->select($products, $productID, 'bug', 'browse', '', $branch);
     foreach ($this->lang->bug->menu as $key => $menu) {
         $replace = $key == 'product' ? $selectHtml : $productID;
         common::setMenuVars($this->lang->bug->menu, $key, $replace);
     }
 }
开发者ID:caiwenhao,项目名称:zentao,代码行数:17,代码来源:model.php

示例3: setMenu

 /**
  * Set the menu.
  * 
  * @param  array  $users    user pairs
  * @param  string $account  current account
  * @access public
  * @return void
  */
 public function setMenu($users, $account)
 {
     $methodName = $this->app->getMethodName();
     $selectHtml = html::select('account', $users, $account, "onchange=\"switchAccount(this.value, '{$methodName}')\"");
     foreach ($this->lang->user->menu as $key => $value) {
         $replace = $key == 'account' ? $selectHtml : $account;
         common::setMenuVars($this->lang->user->menu, $key, $replace);
     }
 }
开发者ID:XMGmen,项目名称:zentao,代码行数:17,代码来源:model.php

示例4: setMenu

 /**
  * Set menus
  * 
  * @param  array  $libs 
  * @param  int    $libID 
  * @param  string $extra 
  * @access public
  * @return void
  */
 public function setMenu($libs, $libID, $extra = '')
 {
     $currentModule = $this->app->getModuleName();
     $currentMethod = $this->app->getMethodName();
     $selectHtml = html::select('libID', $libs, $libID, "onchange=\"switchDocLib(this.value, '{$currentModule}', '{$currentMethod}', '{$extra}');\"");
     common::setMenuVars($this->lang->doc->menu, 'list', $selectHtml . $this->lang->arrow);
     foreach ($this->lang->doc->menu as $key => $menu) {
         if ($key != 'list') {
             common::setMenuVars($this->lang->doc->menu, $key, $libID);
         }
     }
 }
开发者ID:laiello,项目名称:zentaoms,代码行数:21,代码来源:model.php

示例5: setMenu

 /**
  * Set menu. 
  * 
  * @param  array  $products 
  * @param  int    $productID 
  * @param  string $extra 
  * @access public
  * @return void
  */
 public function setMenu($products, $productID, $extra = '')
 {
     /* Has access privilege?. */
     if ($products and !isset($products[$productID]) and !$this->checkPriv($this->getById($productID))) {
         echo js::alert($this->lang->product->accessDenied);
         die(js::locate('back'));
     }
     $currentModule = $this->app->getModuleName();
     $currentMethod = $this->app->getMethodName();
     /* init currentModule and currentMethod for report and story. */
     if ($currentModule == 'story' and $currentMethod != 'create' and $currentMethod != 'batchcreate') {
         $currentModule = 'product';
     }
     if ($currentMethod == 'report') {
         $currentMethod = 'browse';
     }
     $selectHtml = $this->select($products, $productID, $currentModule, $currentMethod, $extra);
     foreach ($this->lang->product->menu as $key => $menu) {
         $replace = $key == 'list' ? $selectHtml : $productID;
         common::setMenuVars($this->lang->product->menu, $key, $replace);
     }
 }
开发者ID:ppmon,项目名称:ppm,代码行数:31,代码来源:model.php

示例6: setMenu

 /**
  * Set menu.
  * 
  * @param  array  $projects 
  * @param  int    $projectID 
  * @param  string $extra
  * @access public
  * @return void
  */
 public function setMenu($projects, $projectID, $extra = '')
 {
     /* Check the privilege. */
     $project = $this->getById($projectID);
     /* Unset story, bug, build and testtask if type is ops. */
     if ($project and $project->type == 'ops') {
         unset($this->lang->project->menu->story);
         unset($this->lang->project->menu->bug);
         unset($this->lang->project->menu->build);
         unset($this->lang->project->menu->testtask);
     }
     if ($projects and !isset($projects[$projectID]) and !$this->checkPriv($project)) {
         echo js::alert($this->lang->project->accessDenied);
         die(js::locate('back'));
     }
     $moduleName = $this->app->getModuleName();
     $methodName = $this->app->getMethodName();
     if ($this->cookie->projectMode == 'noclosed' and $project->status == 'done') {
         setcookie('projectMode', 'all');
         $this->cookie->projectMode = 'all';
     }
     $selectHtml = $this->select($projects, $projectID, $moduleName, $methodName, $extra);
     foreach ($this->lang->project->menu as $key => $menu) {
         $replace = $key == 'list' ? $selectHtml : $projectID;
         common::setMenuVars($this->lang->project->menu, $key, $replace);
     }
 }
开发者ID:nanata1115,项目名称:zentaopms,代码行数:36,代码来源:model.php


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