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


PHP oxNew函数代码示例

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


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

示例1: addPayToSet

 /**
  * Adds this payments to this set
  */
 public function addPayToSet()
 {
     $aChosenSets = $this->_getActionIds('oxpayments.oxid');
     $soxId = $this->getConfig()->getRequestParameter('synchoxid');
     // adding
     if ($this->getConfig()->getRequestParameter('all')) {
         $sPayTable = $this->_getViewName('oxpayments');
         $aChosenSets = $this->_getAll($this->_addFilter("select {$sPayTable}.oxid " . $this->_getQuery()));
     }
     if ($soxId && $soxId != "-1" && is_array($aChosenSets)) {
         $oDb = oxDb::getDb();
         foreach ($aChosenSets as $sChosenSet) {
             // check if we have this entry already in
             $sID = $oDb->getOne("select oxid from oxobject2payment where oxpaymentid = " . $oDb->quote($sChosenSet) . "  and oxobjectid = " . $oDb->quote($soxId) . " and oxtype = 'oxdelset'", false, false);
             if (!isset($sID) || !$sID) {
                 $oObject = oxNew('oxbase');
                 $oObject->init('oxobject2payment');
                 $oObject->oxobject2payment__oxpaymentid = new oxField($sChosenSet);
                 $oObject->oxobject2payment__oxobjectid = new oxField($soxId);
                 $oObject->oxobject2payment__oxtype = new oxField("oxdelset");
                 $oObject->save();
             }
         }
     }
 }
开发者ID:ioanok,项目名称:symfoxid,代码行数:28,代码来源:deliveryset_payment_ajax.php

示例2: getEntryUri

 /**
  * Returns seo uri
  *
  * @return string
  */
 public function getEntryUri()
 {
     $oContent = oxNew('oxcontent');
     if ($oContent->load($this->getEditObjectId())) {
         return $this->_getEncoder()->getContentUri($oContent, $this->getEditLang());
     }
 }
开发者ID:mibexx,项目名称:oxid_yttutorials,代码行数:12,代码来源:content_seo.php

示例3: render

 /**
  * Collects article crosselling and attributes information, passes
  * them to Smarty engine and returns name or template file
  * "article_crossselling.tpl".
  *
  * @return string
  */
 public function render()
 {
     parent::render();
     $this->_aViewData['edit'] = $oArticle = oxNew('oxarticle');
     // crossselling
     $this->_createCategoryTree("artcattree");
     // accessoires
     $this->_createCategoryTree("artcattree2");
     $soxId = $this->getEditObjectId();
     if ($soxId != "-1" && isset($soxId)) {
         // load object
         $oArticle->load($soxId);
         if ($oArticle->isDerived()) {
             $this->_aViewData['readonly'] = true;
         }
     }
     $iAoc = oxRegistry::getConfig()->getRequestParameter("aoc");
     if ($iAoc == 1) {
         $oArticleCrossellingAjax = oxNew('article_crossselling_ajax');
         $this->_aViewData['oxajax'] = $oArticleCrossellingAjax->getColumns();
         return "popups/article_crossselling.tpl";
     } elseif ($iAoc == 2) {
         $oArticleAccessoriesAjax = oxNew('article_accessories_ajax');
         $this->_aViewData['oxajax'] = $oArticleAccessoriesAjax->getColumns();
         return "popups/article_accessories.tpl";
     }
     return "article_crossselling.tpl";
 }
开发者ID:mibexx,项目名称:oxid_yttutorials,代码行数:35,代码来源:article_crossselling.php

示例4: render

 /**
  * Executes parent method parent::render(), creates deliveryset category tree,
  * passes data to Smarty engine and returns name of template file "deliveryset_main.tpl".
  *
  * @return string
  */
 public function render()
 {
     $myConfig = $this->getConfig();
     $sTheme = $this->_sTheme = $this->getEditObjectId();
     $sShopId = $myConfig->getShopId();
     if (!isset($sTheme)) {
         $sTheme = $this->_sTheme = $this->getConfig()->getConfigParam('sTheme');
     }
     $oTheme = oxNew('oxTheme');
     if ($oTheme->load($sTheme)) {
         $this->_aViewData["oTheme"] = $oTheme;
         try {
             $aDbVariables = $this->loadConfVars($sShopId, $this->_getModuleForConfigVars());
             $this->_aViewData["var_constraints"] = $aDbVariables['constraints'];
             $this->_aViewData["var_grouping"] = $aDbVariables['grouping'];
             foreach ($this->_aConfParams as $sType => $sParam) {
                 $this->_aViewData[$sParam] = $aDbVariables['vars'][$sType];
             }
         } catch (oxException $oEx) {
             oxRegistry::get("oxUtilsView")->addErrorToDisplay($oEx);
             $oEx->debugOut();
         }
     } else {
         oxRegistry::get("oxUtilsView")->addErrorToDisplay(oxNew("oxException", 'EXCEPTION_THEME_NOT_LOADED'));
     }
     return 'theme_config.tpl';
 }
开发者ID:ioanok,项目名称:symfoxid,代码行数:33,代码来源:theme_config.php

示例5: __construct

 /**
  * Sets dependencies.
  *
  * @param oxRequiredFieldValidator $oFieldValidator
  */
 public function __construct($oFieldValidator = null)
 {
     if (is_null($oFieldValidator)) {
         $oFieldValidator = oxNew('oxRequiredFieldValidator');
     }
     $this->setFieldValidator($oFieldValidator);
 }
开发者ID:ioanok,项目名称:symfoxid,代码行数:12,代码来源:oxrequiredfieldsvalidator.php

示例6: render

 /**
  * Collects article attributes and selection lists, passes them to Smarty engine,
  * returns name of template file "article_attribute.tpl".
  *
  * @return string
  */
 public function render()
 {
     parent::render();
     $this->_aViewData['edit'] = $oArticle = oxNew('oxarticle');
     $soxId = $this->getEditObjectId();
     if ($soxId != "-1" && isset($soxId)) {
         // load object
         $oArticle->load($soxId);
         if ($oArticle->isDerived()) {
             $this->_aViewData["readonly"] = true;
         }
     }
     $aColumns = array();
     $iAoc = oxConfig::getParameter("aoc");
     if ($iAoc == 1) {
         include_once 'inc/article_attribute.inc.php';
         $this->_aViewData['oxajax'] = $aColumns;
         return "popups/article_attribute.tpl";
     } elseif ($iAoc == 2) {
         include_once 'inc/article_selection.inc.php';
         $this->_aViewData['oxajax'] = $aColumns;
         return "popups/article_selection.tpl";
     }
     return "article_attribute.tpl";
 }
开发者ID:JulianaSchuster,项目名称:oxid-frontend,代码行数:31,代码来源:article_attribute.php

示例7: _getFileManger

 protected function _getFileManger()
 {
     if (is_null($this->_oFileManger)) {
         $this->_oFileManger = oxNew('fileManager');
     }
     return $this->_oFileManger;
 }
开发者ID:OXIDprojects,项目名称:debugax,代码行数:7,代码来源:chromephpmanager.php

示例8: getPayPalConfig

 /**
  * Return PayPal config
  *
  * @return oePayPalConfig
  */
 public function getPayPalConfig()
 {
     if (is_null($this->_oPayPalConfig)) {
         $this->setPayPalConfig(oxNew('oePayPalConfig'));
     }
     return $this->_oPayPalConfig;
 }
开发者ID:Juergen-Busch,项目名称:paypal,代码行数:12,代码来源:oepaypalcontroller.php

示例9: _getStateObject

 /**
  * Returns oxState object
  *
  * @return oxState
  */
 protected function _getStateObject()
 {
     if (is_null($this->_oStateObject)) {
         $this->_oStateObject = oxNew('oxState');
     }
     return $this->_oStateObject;
 }
开发者ID:Alpha-Sys,项目名称:oxideshop_ce,代码行数:12,代码来源:Address.php

示例10: render

 /**
  * Executes parent method parent::render()
  * passes data to Smarty engine and returns name of template file "deliveryset_payment.tpl".
  *
  * @return string
  */
 public function render()
 {
     parent::render();
     $soxId = $this->_aViewData["oxid"] = $this->getEditObjectId();
     if ($soxId != "-1" && isset($soxId)) {
         // load object
         $odeliveryset = oxNew("oxdeliveryset");
         $odeliveryset->setLanguage($this->_iEditLang);
         $odeliveryset->load($soxId);
         $oOtherLang = $odeliveryset->getAvailableInLangs();
         if (!isset($oOtherLang[$this->_iEditLang])) {
             // echo "language entry doesn't exist! using: ".key($oOtherLang);
             $odeliveryset->setLanguage(key($oOtherLang));
             $odeliveryset->load($soxId);
         }
         $this->_aViewData["edit"] = $odeliveryset;
         //Disable editing for derived articles
         if ($odeliveryset->isDerived()) {
             $this->_aViewData['readonly'] = true;
         }
     }
     $aColumns = array();
     $iAoc = oxConfig::getParameter("aoc");
     if ($iAoc == 1) {
         include_once 'inc/deliveryset_payment.inc.php';
         $this->_aViewData['oxajax'] = $aColumns;
         return "popups/deliveryset_payment.tpl";
     } elseif ($iAoc == 2) {
         include_once 'inc/deliveryset_country.inc.php';
         $this->_aViewData['oxajax'] = $aColumns;
         return "popups/deliveryset_country.tpl";
     }
     return "deliveryset_payment.tpl";
 }
开发者ID:JulianaSchuster,项目名称:oxid-frontend,代码行数:40,代码来源:deliveryset_payment.php

示例11: _getStrHandler

 /**
  * Non static getter returning str handler. The sense of getStr() and _getStrHandler() is
  * to be possible to call this method statically ( oxStr::getStr() ), yet leaving the
  * possibility to extend it in modules by overriding _getStrHandler() method.
  *
  * @return object
  */
 protected function _getStrHandler()
 {
     if (oxRegistry::getConfig()->isUtf() && function_exists('mb_strlen')) {
         return oxNew("oxStrMb");
     }
     return oxNew("oxStrRegular");
 }
开发者ID:ioanok,项目名称:symfoxid,代码行数:14,代码来源:oxstr.php

示例12: render

 /**
  * Executes parent method parent::render(), creates oxpricealarm object
  * and passes it's data to Smarty engine. Returns name of template file
  * "pricealarm_main.tpl".
  *
  * @return string
  */
 public function render()
 {
     $config = $this->getConfig();
     parent::render();
     $shopId = $config->getShopId();
     //articles price in subshop and baseshop can be different
     $this->_aViewData['iAllCnt'] = 0;
     $query = "\n            SELECT oxprice, oxartid\n            FROM oxpricealarm\n            WHERE oxsended = '000-00-00 00:00:00' AND oxshopid = '{$shopId}' ";
     $result = oxDb::getDb()->select($query);
     if ($result != false && $result->count() > 0) {
         $simpleCache = array();
         while (!$result->EOF) {
             $price = $result->fields[0];
             $articleId = $result->fields[1];
             if (isset($simpleCache[$articleId])) {
                 if ($simpleCache[$articleId] <= $price) {
                     $this->_aViewData['iAllCnt'] += 1;
                 }
             } else {
                 $article = oxNew("oxArticle");
                 if ($article->load($articleId)) {
                     $articlePrice = $simpleCache[$articleId] = $article->getPrice()->getBruttoPrice();
                     if ($articlePrice <= $price) {
                         $this->_aViewData['iAllCnt'] += 1;
                     }
                 }
             }
             $result->fetchRow();
         }
     }
     return "pricealarm_mail.tpl";
 }
开发者ID:Alpha-Sys,项目名称:oxideshop_ce,代码行数:39,代码来源:PriceAlarmMail.php

示例13: _prepareTag

 /**
  * Prepares tag for search in db
  *
  * @param string $sTag tag to prepare
  *
  * @return string
  */
 protected function _prepareTag($sTag)
 {
     if ($this->_oTagPrepareUtil == null) {
         $this->_oTagPrepareUtil = oxNew('oxtagcloud');
     }
     return $sTag = $this->_oTagPrepareUtil->prepareTags($sTag);
 }
开发者ID:ioanok,项目名称:symfoxid,代码行数:14,代码来源:oxseoencodertag.php

示例14: request_product

 public function request_product()
 {
     $myConfig = $this->getConfig();
     $myUtils = oxRegistry::getUtils();
     //control captcha
     $sMac = oxRegistry::getConfig()->getRequestParameter('c_mac');
     $sMacHash = oxRegistry::getConfig()->getRequestParameter('c_mach');
     $oCaptcha = $this->getCaptcha();
     if (!$oCaptcha->pass($sMac, $sMacHash)) {
         oxRegistry::get("oxUtilsView")->addErrorToDisplay('MESSAGE_WRONG_VERIFICATION_CODE');
         return;
     }
     /** @var oxMailValidator $oMailValidator */
     $oMailValidator = oxNew('oxMailValidator');
     $aParams = oxRegistry::getConfig()->getRequestParameter('pa');
     if (!isset($aParams['email']) || !$oMailValidator->isValidEmail($aParams['email'])) {
         oxRegistry::get("oxUtilsView")->addErrorToDisplay('MESSAGE_INVALID_EMAIL');
         return;
     }
     $aParams['aid'] = $this->getProduct()->getId();
     $oArticleRequest = oxNew("psarticlerequest");
     $oArticleRequest->psarticlerequest__oxuserid = new oxField(oxRegistry::getSession()->getVariable('usr'));
     $oArticleRequest->psarticlerequest__oxemail = new oxField($aParams['email']);
     $oArticleRequest->psarticlerequest__oxartid = new oxField($aParams['aid']);
     $oArticleRequest->psarticlerequest__oxshopid = new oxField($myConfig->getShopId());
     $oArticleRequest->psarticlerequest__oxlang = new oxField(oxRegistry::getLang()->getBaseLanguage());
     $oArticleRequest->psarticlerequest__oxstatus = new oxField(psArticleRequest::STATUS_RECEIVED);
     $oArticleRequest->save();
     $oEmail = oxNew("oxEmail");
     $oEmail->sendArticleRequestNotification($aParams, $oArticleRequest);
     $this->_iArticleRequestStatus = 1;
     oxRegistry::get("oxUtilsView")->addErrorToDisplay('PS_ARTICLEREQUEST_SUCCESS');
 }
开发者ID:HFranz,项目名称:psArticleRequest,代码行数:33,代码来源:psarticlerequest_details.php

示例15: genViews

 /**
  * Generate DB views
  */
 public static function genViews()
 {
     $oShop = oxNew('oxShop');
     if ($oShop->load(oxRegistry::getConfig()->getShopId())) {
         $oShop->generateViews();
     }
 }
开发者ID:proudcommerce,项目名称:psHiddenArticles,代码行数:10,代码来源:pshiddenarticles_setup.php


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