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


PHP BxDolMenu::getInstance方法代码示例

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


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

示例1: setConditionParams

 /**
  * Set class fields condition params and paginate array
  */
 function setConditionParams()
 {
     $aWhere = array();
     $aWhere[] = '1';
     $sKeyword = bx_process_input(bx_get('keyword'));
     if ($sKeyword !== false) {
         $this->aCurrent['restriction']['keyword'] = array('value' => $sKeyword, 'field' => '', 'operator' => 'against');
     }
     if (isset($_GET['ownerName'])) {
         $sName = bx_process_input($_GET['ownerName']);
         $iUser = (int) BxDolProfileQuery::getInstance()->getIdByNickname($sName);
         BxDolMenu::getInstance()->setCurrentProfileID($iUser);
     } elseif (isset($_GET['userID'])) {
         $iUser = bx_process_input($_GET['userID'], BX_DATA_INT);
     }
     if (!empty($iUser)) {
         $this->aCurrent['restriction']['owner']['value'] = $iUser;
     }
     $this->setPaginate();
     $iNum = $this->getNum();
     if ($iNum > 0) {
         $this->aCurrent['paginate']['num'] = $iNum;
     } else {
         $this->aCurrent['paginate']['num'] = 0;
     }
 }
开发者ID:Baloo7super,项目名称:dolphin,代码行数:29,代码来源:BxDolSearch.php

示例2: setConditionParams

 /**
  * Set class fields condition params and paginate array
  */
 function setConditionParams()
 {
     // keyword
     $sKeyword = bx_process_input(bx_get('keyword'));
     if ($sKeyword !== false) {
         $this->aCurrent['restriction']['keyword'] = array('value' => $sKeyword, 'field' => '', 'operator' => 'against');
     }
     // owner
     if (isset($_GET['ownerName'])) {
         $sName = bx_process_input($_GET['ownerName']);
         $iUser = (int) BxDolProfileQuery::getInstance()->getIdByNickname($sName);
         BxDolMenu::getInstance()->setCurrentProfileID($iUser);
     } elseif (isset($_GET['userID'])) {
         $iUser = bx_process_input($_GET['userID'], BX_DATA_INT);
     }
     if (!empty($iUser)) {
         $this->aCurrent['restriction']['owner']['value'] = $iUser;
     }
     // meta info
     if ($this->_sMetaType && !empty($this->aCurrent['object_metatags'])) {
         bx_import('BxDolMetatags');
         $o = BxDolMetatags::getObjectInstance($this->aCurrent['object_metatags']);
         if ($o) {
             unset($this->aCurrent['restriction']['keyword']);
             switch ($this->_sMetaType) {
                 case 'location_country':
                     $o->locationsSetSearchCondition($this, $sKeyword);
                     break;
                 case 'location_country_city':
                     $o->locationsSetSearchCondition($this, $sKeyword, bx_process_input(bx_get('state')), bx_process_input(bx_get('city')));
                     break;
                 case 'mention':
                     // TODO:
                     break;
                 case 'keyword':
                     $o->keywordsSetSearchCondition($this, $sKeyword);
                     break;
             }
         }
     }
     $this->setPaginate();
     $iNum = $this->getNum();
     if ($iNum > 0) {
         $this->aCurrent['paginate']['num'] = $iNum;
     } else {
         $this->aCurrent['paginate']['num'] = 0;
     }
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:51,代码来源:BxDolSearch.php


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