• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP getViewName函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中getViewName函数的典型用法代码示例。如果您正苦于以下问题:PHP getViewName函数的具体用法?PHP getViewName怎么用?PHP getViewName使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: render

 /**
  * Executes parent method parent::render(), creates oxlist object and
  * collects user groups information, passes data to Smarty engine,
  * returns name of template file "news_main.tpl".
  *
  * @return string
  */
 public function render()
 {
     $myConfig = $this->getConfig();
     parent::render();
     // all usergroups
     $oGroups = oxNew("oxlist");
     $oGroups->init("oxgroups");
     $oGroups->selectString("select * from " . getViewName("oxgroups", $this->_iEditLang));
     $soxId = $this->_aViewData["oxid"] = $this->getEditObjectId();
     if ($soxId != "-1" && isset($soxId)) {
         // load object
         $oNews = oxNew("oxnews");
         $oNews->loadInLang($this->_iEditLang, $soxId);
         $oOtherLang = $oNews->getAvailableInLangs();
         if (!isset($oOtherLang[$this->_iEditLang])) {
             // echo "language entry doesn't exist! using: ".key($oOtherLang);
             $oNews->loadInLang(key($oOtherLang), $soxId);
         }
         $this->_aViewData["edit"] = $oNews;
         // remove already created languages
         $this->_aViewData["posslang"] = array_diff(oxRegistry::getLang()->getLanguageNames(), $oOtherLang);
         foreach ($oOtherLang as $id => $language) {
             $oLang = new stdClass();
             $oLang->sLangDesc = $language;
             $oLang->selected = $id == $this->_iEditLang;
             $this->_aViewData["otherlang"][$id] = clone $oLang;
         }
     }
     if (oxRegistry::getConfig()->getRequestParameter("aoc")) {
         $oNewsMainAjax = oxNew('news_main_ajax');
         $this->_aViewData['oxajax'] = $oNewsMainAjax->getColumns();
         return "popups/news_main.tpl";
     }
     return "news_main.tpl";
 }
开发者ID:ioanok,项目名称:symfoxid,代码行数:42,代码来源:news_main.php


示例2: getIdByName

 /**
  * returns delivery set id
  *
  * @param string $sTitle delivery name
  *
  * @return string
  */
 public function getIdByName($sTitle)
 {
     $oDb = oxDb::getDb();
     $sQ = "SELECT `oxid` FROM `" . getViewName('oxdeliveryset') . "` WHERE  `oxtitle` = " . $oDb->quote($sTitle);
     $sId = $oDb->getOne($sQ);
     return $sId;
 }
开发者ID:mibexx,项目名称:oxid_yttutorials,代码行数:14,代码来源:oxdeliveryset.php


示例3: _prepareWhereQuery

 /**
  * Adds active promotion check
  *
  * @param array  $aWhere  SQL condition array
  * @param string $sqlFull SQL query string
  *
  * @return $sQ
  */
 protected function _prepareWhereQuery($aWhere, $sqlFull)
 {
     $sQ = parent::_prepareWhereQuery($aWhere, $sqlFull);
     $sDisplayType = (int) oxRegistry::getConfig()->getRequestParameter('displaytype');
     $sTable = getViewName("oxactions");
     //searchong for empty oxfolder fields
     if ($sDisplayType) {
         $sNow = date('Y-m-d H:i:s', oxRegistry::get("oxUtilsDate")->getTime());
         switch ($sDisplayType) {
             case 1:
                 // active
                 $sQ .= " and {$sTable}.oxactivefrom < '{$sNow}' and {$sTable}.oxactiveto > '{$sNow}' ";
                 break;
             case 2:
                 // upcoming
                 $sQ .= " and {$sTable}.oxactivefrom > '{$sNow}' ";
                 break;
             case 3:
                 // expired
                 $sQ .= " and {$sTable}.oxactiveto < '{$sNow}' and {$sTable}.oxactiveto != '0000-00-00 00:00:00' ";
                 break;
         }
     }
     return $sQ;
 }
开发者ID:mibexx,项目名称:oxid_yttutorials,代码行数:33,代码来源:actions_list.php


示例4: getVoucherByNr

 /**
  * Gets voucher from db by given number.
  *
  * @param string $sVoucherNr         Voucher number
  * @param array  $aVouchers          Array of available vouchers (default array())
  * @param bool   $blCheckavalability check if voucher is still reserver od not
  *
  * @throws oxVoucherException exception
  *
  * @return mixed
  */
 public function getVoucherByNr($sVoucherNr, $aVouchers = array(), $blCheckavalability = false)
 {
     $oRet = null;
     if (!empty($sVoucherNr)) {
         $sViewName = $this->getViewName();
         $sSeriesViewName = getViewName('oxvoucherseries');
         $oDb = oxDb::getDb();
         $sQ = "select {$sViewName}.* from {$sViewName}, {$sSeriesViewName} where\n                        {$sSeriesViewName}.oxid = {$sViewName}.oxvoucherserieid and\n                        {$sViewName}.oxvouchernr = " . $oDb->quote($sVoucherNr) . " and ";
         if (is_array($aVouchers)) {
             foreach ($aVouchers as $sVoucherId => $sSkipVoucherNr) {
                 $sQ .= "{$sViewName}.oxid != " . $oDb->quote($sVoucherId) . " and ";
             }
         }
         $sQ .= "( {$sViewName}.oxorderid is NULL || {$sViewName}.oxorderid = '' ) ";
         $sQ .= " and ( {$sViewName}.oxdateused is NULL || {$sViewName}.oxdateused = 0 ) ";
         //voucher timeout for 3 hours
         if ($blCheckavalability) {
             $iTime = time() - $this->_getVoucherTimeout();
             $sQ .= " and {$sViewName}.oxreserved < '{$iTime}' ";
         }
         $sQ .= " limit 1";
         if (!($oRet = $this->assignRecord($sQ))) {
             $oEx = oxNew('oxVoucherException');
             $oEx->setMessage('ERROR_MESSAGE_VOUCHER_NOVOUCHER');
             $oEx->setVoucherNr($sVoucherNr);
             throw $oEx;
         }
     }
     return $oRet;
 }
开发者ID:Alpha-Sys,项目名称:oxideshop_ce,代码行数:41,代码来源:Voucher.php


示例5: getTitleById

 /**
  * Get state title by id
  *
  * @param integer|string $iStateId
  *
  * @return string
  */
 public function getTitleById($iStateId)
 {
     $oDb = oxDb::getDb();
     $sQ = "SELECT oxtitle FROM " . getViewName("oxstates") . " WHERE oxid = " . $oDb->quote($iStateId);
     $sStateTitle = $oDb->getOne($sQ);
     return (string) $sStateTitle;
 }
开发者ID:ioanok,项目名称:symfoxid,代码行数:14,代码来源:oxstate.php


示例6: load

 /**
  * Selects and loads all address for particular user.
  *
  * @param string $sUserId user id
  */
 public function load($sUserId)
 {
     $sViewName = getViewName('oxcountry');
     $oBaseObject = $this->getBaseObject();
     $sSelectFields = $oBaseObject->getSelectFields();
     $sSelect = "\n                SELECT {$sSelectFields}, `oxcountry`.`oxtitle` AS oxcountry\n                FROM oxaddress\n                LEFT JOIN {$sViewName} AS oxcountry ON oxaddress.oxcountryid = oxcountry.oxid\n                WHERE oxaddress.oxuserid = " . oxDb::getDb()->quote($sUserId);
     $this->selectString($sSelect);
 }
开发者ID:mibexx,项目名称:oxid_yttutorials,代码行数:13,代码来源:oxuseraddresslist.php


示例7: testDescWithHtmlEntity

 /**
  * tests save function with special chars
  */
 public function testDescWithHtmlEntity()
 {
     $oLink = oxNew("oxlinks", getViewName('oxlinks'));
     $oLink->load($this->_oxLinks->getId());
     $oLink->oxlinks__oxurldesc = new oxField('Link&, &amp;, !@#$%^&*%$$&@\'.,;p"äüßö', oxField::T_RAW);
     $this->_oxLinks->Save();
     $this->assertEquals('Link&, &amp;, !@#$%^&*%$$&@\'.,;p"äüßö', $oLink->oxlinks__oxurldesc->value);
 }
开发者ID:Alpha-Sys,项目名称:oxideshop_ce,代码行数:11,代码来源:LinksTest.php


示例8: _buildSelectString

 /**
  * Builds and returns SQL query string. Adds additional order check.
  *
  * @param object $oListObject list main object.
  *
  * @return string
  */
 protected function _buildSelectString($oListObject = null)
 {
     $sSql = parent::_buildSelectString($oListObject);
     $sPaymentTable = getViewName("oxpayments");
     $sQ = ", `oepaypal_order`.`oepaypal_paymentstatus`, `payments`.`oxdesc` as `paymentname` from `oxorder`\n        LEFT JOIN `oepaypal_order` ON `oepaypal_order`.`oepaypal_orderid` = `oxorder`.`oxid`\n        LEFT JOIN `" . $sPaymentTable . "` AS `payments` on `payments`.oxid=oxorder.oxpaymenttype ";
     $sSql = str_replace('from oxorder', $sQ, $sSql);
     return $sSql;
 }
开发者ID:Juergen-Busch,项目名称:paypal,代码行数:15,代码来源:oepaypalorder_list.php


示例9: getContentList

 /**
  * Gets list of content pages which could be used for embedding
  * business entity, price specification, and delivery specification data
  *
  * @return oxContentList
  */
 public function getContentList()
 {
     $oContentList = oxNew("oxcontentlist");
     $sTable = getViewName("oxcontents", $this->_iEditLang);
     $oContentList->selectString("SELECT * FROM {$sTable} WHERE OXACTIVE = 1 AND OXTYPE = 0\n                                    AND OXLOADID IN ('oxagb', 'oxdeliveryinfo', 'oximpressum', 'oxrightofwithdrawal')\n                                    AND OXSHOPID = '" . oxRegistry::getConfig()->getRequestParameter("oxid") . "'");
     // $this->getEditObjectId()
     return $oContentList;
 }
开发者ID:Crease29,项目名称:oxideshop_ce,代码行数:14,代码来源:shop_rdfa.php


示例10: loadRandomManufacturerArticles

 /**
  * @param      $sId             oxManufacturer oxId
  * @param int  $iAmount         amount of articles to be loaded
  */
 public function loadRandomManufacturerArticles($sId, $iAmount = 1)
 {
     //var_dump($sId);
     //var_dump($iAmount);
     $sArticleTable = getViewName('oxarticles');
     $sSelect = "SELECT * FROM {$sArticleTable} WHERE oxmanufacturerid = '{$sId}' AND  oxactive = 1 and oxissearch = 1  ORDER BY RAND() LIMIT {$iAmount}";
     $this->selectString($sSelect);
 }
开发者ID:spoilie,项目名称:vt-rca,代码行数:12,代码来源:oxarticlelist_rca.php


示例11: render

 /**
  * Executes parent method parent::render(), creates oxCategoryList object,
  * passes it's data to Smarty engine and returns name of template file
  * "selectlist_main.tpl".
  *
  * @return string
  */
 public function render()
 {
     parent::render();
     $sOxId = $this->_aViewData["oxid"] = $this->getEditObjectId();
     $sArticleTable = getViewName('oxarticles');
     //create empty edit object
     $this->_aViewData["edit"] = oxNew("oxselectlist");
     if (isset($sOxId) && $sOxId != "-1") {
         // generating category tree for select list
         // A. hack - passing language by post as lists uses only language passed by POST/GET/SESSION
         $_POST["language"] = $this->_iEditLang;
         $this->_createCategoryTree("artcattree", $sOxId);
         // load object
         $oAttr = oxNew("oxselectlist");
         $oAttr->loadInLang($this->_iEditLang, $sOxId);
         $aFieldList = $oAttr->getFieldList();
         if (is_array($aFieldList)) {
             foreach ($aFieldList as $key => $oField) {
                 if ($oField->priceUnit == '%') {
                     $oField->price = $oField->fprice;
                 }
             }
         }
         $oOtherLang = $oAttr->getAvailableInLangs();
         if (!isset($oOtherLang[$this->_iEditLang])) {
             // echo "language entry doesn't exist! using: ".key($oOtherLang);
             $oAttr->loadInLang(key($oOtherLang), $sOxId);
         }
         $this->_aViewData["edit"] = $oAttr;
         // Disable editing for derived items.
         if ($oAttr->isDerived()) {
             $this->_aViewData['readonly'] = true;
         }
         // remove already created languages
         $aLang = array_diff(oxRegistry::getLang()->getLanguageNames(), $oOtherLang);
         if (count($aLang)) {
             $this->_aViewData["posslang"] = $aLang;
         }
         foreach ($oOtherLang as $id => $language) {
             $oLang = new stdClass();
             $oLang->sLangDesc = $language;
             $oLang->selected = $id == $this->_iEditLang;
             $this->_aViewData["otherlang"][$id] = clone $oLang;
         }
         $iErr = oxRegistry::getSession()->getVariable("iErrorCode");
         if (!$iErr) {
             $iErr = ERR_SUCCESS;
         }
         $this->_aViewData["iErrorCode"] = $iErr;
         oxRegistry::getSession()->setVariable("iErrorCode", ERR_SUCCESS);
     }
     if (oxRegistry::getConfig()->getRequestParameter("aoc")) {
         $oSelectlistMainAjax = oxNew('selectlist_main_ajax');
         $this->_aViewData['oxajax'] = $oSelectlistMainAjax->getColumns();
         return "popups/selectlist_main.tpl";
     }
     return "selectlist_main.tpl";
 }
开发者ID:Alpha-Sys,项目名称:oxideshop_ce,代码行数:65,代码来源:SelectListMain.php


示例12: _buildSelectString

 /**
  * Modifying SQL query to load additional article and customer data
  *
  * @param object $oListObject list main object
  *
  * @return string
  */
 protected function _buildSelectString($oListObject = null)
 {
     $sViewName = getViewName("oxarticles", (int) $this->getConfig()->getConfigParam("sDefaultLang"));
     $sSql = "select psarticlerequest.*, {$sViewName}.oxtitle AS articletitle, ";
     $sSql .= "oxuser.oxlname as userlname, oxuser.oxfname as userfname ";
     $sSql .= "from psarticlerequest left join {$sViewName} on {$sViewName}.oxid = psarticlerequest.oxartid ";
     $sSql .= "left join oxuser on oxuser.oxid = psarticlerequest.oxuserid WHERE 1 ";
     return $sSql;
 }
开发者ID:HFranz,项目名称:psArticleRequest,代码行数:16,代码来源:psarticlerequest_admin_list.php


示例13: render

 /**
  * Executes parent method parent::render(), creates oxCategoryList object,
  * passes it's data to Smarty engine and returns name of template file
  * "selectlist_main.tpl".
  *
  * @return string
  */
 public function render()
 {
     $myConfig = $this->getConfig();
     parent::render();
     $sOxId = $this->_aViewData["oxid"] = $this->getEditObjectId();
     $sArticleTable = getViewName('oxarticles');
     //create empty edit object
     $this->_aViewData["edit"] = oxNew("oxselectlist");
     if ($sOxId != "-1" && isset($sOxId)) {
         // generating category tree for select list
         // A. hack - passing language by post as lists uses only language passed by POST/GET/SESSION
         $_POST["language"] = $this->_iEditLang;
         $sChosenArtCat = $this->_getCategoryTree("artcattree", $sChosenArtCat, $sOxId);
         // load object
         $oAttr = oxNew("oxselectlist");
         $oAttr->loadInLang($this->_iEditLang, $sOxId);
         $aFieldList = $oAttr->getFieldList();
         if (is_array($aFieldList)) {
             foreach ($aFieldList as $key => $oField) {
                 if ($oField->priceUnit == '%') {
                     $oField->price = $oField->fprice;
                 }
             }
         }
         $oOtherLang = $oAttr->getAvailableInLangs();
         if (!isset($oOtherLang[$this->_iEditLang])) {
             // echo "language entry doesn't exist! using: ".key($oOtherLang);
             $oAttr->loadInLang(key($oOtherLang), $sOxId);
         }
         $this->_aViewData["edit"] = $oAttr;
         // remove already created languages
         $aLang = array_diff(oxLang::getInstance()->getLanguageNames(), $oOtherLang);
         if (count($aLang)) {
             $this->_aViewData["posslang"] = $aLang;
         }
         foreach ($oOtherLang as $id => $language) {
             $oLang = new oxStdClass();
             $oLang->sLangDesc = $language;
             $oLang->selected = $id == $this->_iEditLang;
             $this->_aViewData["otherlang"][$id] = clone $oLang;
         }
         $iErr = oxSession::getVar("iErrorCode");
         if (!$iErr) {
             $iErr = ERR_SUCCESS;
         }
         $this->_aViewData["iErrorCode"] = $iErr;
         oxSession::setVar("iErrorCode", ERR_SUCCESS);
     }
     if (oxConfig::getParameter("aoc")) {
         $aColumns = array();
         include_once 'inc/' . strtolower(__CLASS__) . '.inc.php';
         $this->_aViewData['oxajax'] = $aColumns;
         return "popups/selectlist_main.tpl";
     }
     return "selectlist_main.tpl";
 }
开发者ID:JulianaSchuster,项目名称:oxid-frontend,代码行数:63,代码来源:selectlist_main.php


示例14: render

 /**
  * Loads article variants data, passes it to Smarty engine and returns name of
  * template file "article_variant.tpl".
  *
  * @return string
  */
 public function render()
 {
     parent::render();
     $soxId = $this->getEditObjectId();
     $sSLViewName = getViewName('oxselectlist');
     // all selectlists
     $oAllSel = oxNew("oxlist");
     $oAllSel->init("oxselectlist");
     $sQ = "select * from {$sSLViewName}";
     $oAllSel->selectString($sQ);
     $this->_aViewData["allsel"] = $oAllSel;
     $oArticle = oxNew("oxArticle");
     $this->_aViewData["edit"] = $oArticle;
     if (isset($soxId) && $soxId != "-1") {
         // load object
         $oArticle->loadInLang($this->_iEditLang, $soxId);
         if ($oArticle->isDerived()) {
             $this->_aViewData['readonly'] = true;
         }
         $_POST["language"] = $_GET["language"] = $this->_iEditLang;
         $oVariants = $oArticle->getAdminVariants($this->_iEditLang);
         $this->_aViewData["mylist"] = $oVariants;
         // load object in other languages
         $oOtherLang = $oArticle->getAvailableInLangs();
         if (!isset($oOtherLang[$this->_iEditLang])) {
             // echo "language entry doesn't exist! using: ".key($oOtherLang);
             $oArticle->loadInLang(key($oOtherLang), $soxId);
         }
         foreach ($oOtherLang as $id => $language) {
             $oLang = new stdClass();
             $oLang->sLangDesc = $language;
             $oLang->selected = $id == $this->_iEditLang;
             $this->_aViewData["otherlang"][$id] = clone $oLang;
         }
         if ($oArticle->oxarticles__oxparentid->value) {
             $this->_aViewData["parentarticle"] = $this->_getProductParent($oArticle->oxarticles__oxparentid->value);
             $this->_aViewData["oxparentid"] = $oArticle->oxarticles__oxparentid->value;
             $this->_aViewData["issubvariant"] = 1;
             // A. disable variant information editing for variant
             $this->_aViewData["readonly"] = 1;
         }
         $this->_aViewData["editlanguage"] = $this->_iEditLang;
         $aLang = array_diff(oxRegistry::getLang()->getLanguageNames(), $oOtherLang);
         if (count($aLang)) {
             $this->_aViewData["posslang"] = $aLang;
         }
         foreach ($oOtherLang as $id => $language) {
             $oLang = new stdClass();
             $oLang->sLangDesc = $language;
             $oLang->selected = $id == $this->_iEditLang;
             $this->_aViewData["otherlang"][$id] = $oLang;
         }
     }
     return "article_variant.tpl";
 }
开发者ID:Alpha-Sys,项目名称:oxideshop_ce,代码行数:61,代码来源:ArticleVariant.php


示例15: testGetQuerySynchoxid

 /**
  * DiscountMainAjax::_getQuery() test case
  *
  * @return null
  */
 public function testGetQuerySynchoxid()
 {
     $sSynchoxid = '_testSynchoxid';
     $this->setRequestParameter("synchoxid", $sSynchoxid);
     $sTable = getViewName("oxcountry");
     $oView = oxNew('discount_main_ajax');
     $sQuery = "from {$sTable} where {$sTable}.oxactive = '1' and";
     $sQuery .= " {$sTable}.oxid not in ( select {$sTable}.oxid from oxobject2discount, {$sTable} where {$sTable}.oxid=oxobject2discount.oxobjectid";
     $sQuery .= " and oxobject2discount.oxdiscountid = '_testSynchoxid' and oxobject2discount.oxtype = 'oxcountry' )";
     $this->assertEquals($sQuery, trim($oView->UNITgetQuery()));
 }
开发者ID:Crease29,项目名称:oxideshop_ce,代码行数:16,代码来源:discountmainajaxTest.php


示例16: loadArticles

 /**
  * Loads all relevant articles into the current list object
  *
  * @param int    $currPage The current page
  * @param int    $pageSize The page size
  * @param string $skuFilter A single SKU / OXARTNUM
  * @param string $categoryFilter A single oxcategory ID
  */
 public function loadArticles($currPage = 1, $pageSize = 10, $skuFilter = '', $categoryFilter = '')
 {
     //has module?
     $myConfig = $this->getConfig();
     $this->_aArray = array();
     $currPage = $currPage - 1;
     $values = array();
     $sArticleTable = getViewName('oxarticles');
     if ($myConfig->getConfigParam('blNewArtByInsert')) {
         $sType = 'oxinsert';
     } else {
         $sType = 'oxtimestamp';
     }
     $sSelect = "SELECT {$sArticleTable}.* from {$sArticleTable}";
     $sWhere = " WHERE {$sArticleTable}.oxparentid = '' AND " . $this->getBaseObject()->getSqlActiveSnippet() . " AND {$sArticleTable}.oxissearch = 1 AND {$sArticleTable}.oxpic1 != '' ";
     if ($skuFilter) {
         $sWhere .= ' AND $sArticleTable.oxartnum=?';
         $values[] = $skuFilter;
     }
     if ($categoryFilter) {
         /**
                     $oCatList = oxNew('oxcategorylist');
                     $oCatList->buildTree($categoryFilter);
                     $cat_arr = array();
                     foreach($oCatList as $cat){
                         $cat_arr[] = $cat->getId();
                     }
                     $catids = '"'.(implode('","',$cat_arr)).'"';
                     **/
         $sJoin = " JOIN oxobject2category o2c ON " . $sArticleTable . ".oxid = o2c.oxobjectid JOIN oxcategories cat on cat.oxid = o2c.oxcatnid";
         $sWhere .= ' AND cat.oxid IN(';
         /**
                     foreach($cat_arr as $cat){
                         $sWhere .= '?,';
                         $values[] = $cat;
                     }
                     $sWhere = rtrim($sWhere,',').')';
                     **/
         // Used this query instead of the oxid tree function cause they didnt return a proper tree ...
         $sWhere .= "SELECT OXID from oxcategories WHERE OXID = '" . $categoryFilter . "' OR OXPARENTID = '" . $categoryFilter . "' OR OXROOTID = '" . $categoryFilter . "')";
     }
     $sOrder = " ORDER by {$sArticleTable}." . $sType . " DESC ";
     if (!($iLimit = (int) $pageSize)) {
         $iLimit = $myConfig->getConfigParam('iNrofNewcomerArticles');
     }
     $iStart = $currPage;
     if ($iStart > 0) {
         $iStart = $iStart * $iLimit;
     }
     $selectString = $sSelect . $sJoin . $sWhere . $sOrder;
     $this->_aSqlLimit[0] = $iStart;
     $this->_aSqlLimit[1] = $iLimit;
     $this->selectString($selectString, $values);
 }
开发者ID:styladev,项目名称:oxid,代码行数:62,代码来源:StylaFeed_Articlelist.php


示例17: testGetQuerySynchoxid

 /**
  * DiscountUsersAjax::_getQuery() test case
  */
 public function testGetQuerySynchoxid()
 {
     $sSynchoxid = '_testSynchoxid';
     $this->setRequestParameter("synchoxid", $sSynchoxid);
     $sUserTable = getViewName("oxuser");
     $oView = oxNew('discount_users_ajax');
     $sQuery = "from {$sUserTable} where 1  and oxshopid = '" . $this->getShopId() . "'  and";
     $sQuery .= " {$sUserTable}.oxid not in ( select {$sUserTable}.oxid from oxobject2discount, {$sUserTable} where {$sUserTable}.oxid=oxobject2discount.oxobjectid ";
     $sQuery .= " and oxobject2discount.oxdiscountid = '_testSynchoxid' and oxobject2discount.oxtype = 'oxuser' )";
     $this->assertEquals($sQuery, trim($oView->UNITgetQuery()));
 }
开发者ID:Crease29,项目名称:oxideshop_ce,代码行数:14,代码来源:discountusersajaxTest.php


示例18: setUserGroups

 /**
  * Collects and returns user group list.
  *
  * @return object
  */
 public function setUserGroups()
 {
     if ($this->_oGroups === null) {
         $this->_oGroups = oxNew('oxlist');
         $this->_oGroups->init('oxgroups');
         $sViewName = getViewName("oxgroups");
         $sSelect = "select gr.* from {$sViewName} as gr, oxobject2group as o2g where\n                         o2g.oxobjectid = " . oxDb::getDb()->quote($this->getId()) . " and gr.oxid = o2g.oxgroupsid ";
         $this->_oGroups->selectString($sSelect);
     }
     return $this->_oGroups;
 }
开发者ID:mibexx,项目名称:oxid_yttutorials,代码行数:16,代码来源:oxvoucherserie.php


示例19: getItemDiscountProductTitle

 /**
  * Returns item discount product title
  *
  * @return string
  */
 public function getItemDiscountProductTitle()
 {
     $sTitle = false;
     $sOxId = $this->getEditObjectId();
     if ($sOxId != "-1" && isset($sOxId)) {
         $sViewName = getViewName("oxarticles", $this->_iEditLang);
         $oDb = oxDb::getDb();
         $sQ = "select concat( {$sViewName}.oxartnum, ' ', {$sViewName}.oxtitle ) from oxdiscount\n                   left join {$sViewName} on {$sViewName}.oxid=oxdiscount.oxitmartid\n                   where oxdiscount.oxitmartid != '' and oxdiscount.oxid=" . $oDb->quote($sOxId);
         $sTitle = $oDb->getOne($sQ, false, false);
     }
     return $sTitle ? $sTitle : " -- ";
 }
开发者ID:ioanok,项目名称:symfoxid,代码行数:17,代码来源:discount_main.php


示例20: testBuildWhere

 /**
  * PriceAlarm_List::BuildWhere() test case
  *
  * @return null
  */
 public function testBuildWhere()
 {
     $this->setRequestParameter('where', array("oxpricealarm" => array("oxprice" => 15), "oxarticles" => array("oxprice" => 15)));
     $sViewName = getViewName("oxpricealarm");
     $sArtViewName = getViewName("oxarticles");
     $oView = $this->getMock("PriceAlarm_List", array("_authorize"));
     $oView->expects($this->any())->method('_authorize')->will($this->returnValue(true));
     $oView->init();
     $queryWhereParts = $oView->buildWhere();
     $this->assertEquals('%15%', $queryWhereParts[$sViewName . '.oxprice']);
     $this->assertEquals('%15%', $queryWhereParts[$sArtViewName . '.oxprice']);
 }
开发者ID:Crease29,项目名称:oxideshop_ce,代码行数:17,代码来源:pricealarmlistTest.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getVisitorClient函数代码示例发布时间:2022-05-15
下一篇:
PHP getViewByName函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap