本文整理汇总了PHP中oxUBase::init方法的典型用法代码示例。如果您正苦于以下问题:PHP oxUBase::init方法的具体用法?PHP oxUBase::init怎么用?PHP oxUBase::init使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类oxUBase
的用法示例。
在下文中一共展示了oxUBase::init方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: init
public function init()
{
parent::init();
$this->resize_imagepath = rtrim($this->getConfig()->getPicturePath(null), '/') . '/stylafeed/';
if (!file_exists($this->resize_imagepath)) {
@mkdir($this->resize_imagepath);
}
$this->oModule = oxNew('oxModule');
$this->oModule->load('StylaFeed');
}
示例2: init
/**
* Initializes all required components.
*
* @return null|void
*/
public function init()
{
parent::init();
set_exception_handler(array($this, 'exceptionHandler'));
try {
$this->_initVersionLayer();
} catch (Exception $e) {
$sMessage = json_encode($this->_errorMessage($e->getMessage()), JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT);
if ($this->_hasRegistry('getUtils')) {
$oUtils = oxRegistry::getUtils();
} else {
$oUtils = oxUtils::getInstance();
}
$oUtils->showMessageAndExit($sMessage);
}
}
示例3: init
/**
* Sets self::$_aCollectedComponentNames to null, as views and widgets
* controllers loads different components and calls parent::init()
*/
public function init()
{
self::$_aCollectedComponentNames = null;
if (!empty($this->_aComponentNames)) {
foreach ($this->_aComponentNames as $sComponentName => $sCompCache) {
$oActTopView = $this->getConfig()->getTopActiveView();
if ($oActTopView) {
$this->_oaComponents[$sComponentName] = $oActTopView->getComponent($sComponentName);
if (!isset($this->_oaComponents[$sComponentName])) {
$this->_blLoadComponents = true;
break;
} else {
$this->_oaComponents[$sComponentName]->setParent($this);
}
}
}
}
parent::init();
}
示例4: init
/**
* Loads basket oxsession::getBasket(), sets $this->oBasket->blCalcNeeded = true to
* recalculate, sets back basket to session oxsession::setBasket(), executes
* parent::init().
*/
public function init()
{
// disabling performance control variable
$this->getConfig()->setConfigParam('bl_perfCalcVatOnlyForBasketOrder', false);
// recalc basket cause of payment stuff
if ($oBasket = $this->getBasket()) {
$oBasket->onUpdate();
}
parent::init();
}
示例5: init
/**
* Fetches search parameter from GET/POST/session, prepares search
* SQL (search::GetWhere()), and executes it forming the list of
* found articles. Article list is stored at search::_aArticleList
* array.
*
* @return null
*/
public function init()
{
parent::init();
$myConfig = $this->getConfig();
// #1184M - special char search
$oConfig = oxRegistry::getConfig();
$sSearchParamForQuery = trim($oConfig->getRequestParameter('searchparam', true));
// searching in category ?
$sInitialSearchCat = $this->_sSearchCatId = rawurldecode($oConfig->getRequestParameter('searchcnid'));
// searching in vendor #671
$sInitialSearchVendor = rawurldecode($oConfig->getRequestParameter('searchvendor'));
// searching in Manufacturer #671
$sManufacturerParameter = $oConfig->getRequestParameter('searchmanufacturer');
$sInitialSearchManufacturer = $this->_sSearchManufacturer = rawurldecode($sManufacturerParameter);
$this->_blEmptySearch = false;
if (!$sSearchParamForQuery && !$sInitialSearchCat && !$sInitialSearchVendor && !$sInitialSearchManufacturer) {
//no search string
$this->_aArticleList = null;
$this->_blEmptySearch = true;
return false;
}
// config allows to search in Manufacturers ?
if (!$myConfig->getConfigParam('bl_perfLoadManufacturerTree')) {
$sInitialSearchManufacturer = null;
}
// searching ..
/** @var oxSearch $oSearchHandler */
$oSearchHandler = oxNew('oxsearch');
$oSearchList = $oSearchHandler->getSearchArticles($sSearchParamForQuery, $sInitialSearchCat, $sInitialSearchVendor, $sInitialSearchManufacturer, $this->getSortingSql($this->getSortIdent()));
// list of found articles
$this->_aArticleList = $oSearchList;
$this->_iAllArtCnt = 0;
// skip count calculation if no articles in list found
if ($oSearchList->count()) {
$this->_iAllArtCnt = $oSearchHandler->getSearchArticleCount($sSearchParamForQuery, $sInitialSearchCat, $sInitialSearchVendor, $sInitialSearchManufacturer);
}
$iNrofCatArticles = (int) $myConfig->getConfigParam('iNrofCatArticles');
$iNrofCatArticles = $iNrofCatArticles ? $iNrofCatArticles : 1;
$this->_iCntPages = round($this->_iAllArtCnt / $iNrofCatArticles + 0.49);
}
示例6: init
/**
* Executes parent::init(), Loads user chosen product object (with all data).
*/
public function init()
{
if (oxRegistry::getConfig()->getRequestParameter('recommid') && !$this->getActiveRecommList()) {
oxRegistry::getUtils()->redirect($this->getConfig()->getShopHomeURL(), true, 302);
}
oxUBase::init();
}
示例7: init
/**
* Executes parent method parent::init().
*
* @return null
*/
public function init()
{
$this->_filterDynData();
parent::init();
}
示例8: init
/**
* Executes parent::init(), loads basket from session
* (thankyou::_oBasket = oxsession::getBasket()) then destroys
* it (oxsession::delBasket()), unsets user session ID, if
* this user didn't entered password while ordering.
*
* @return null
*/
public function init()
{
parent::init();
// get basket we might need some information from it here
$oBasket = $this->getSession()->getBasket();
$oBasket->setOrderId(oxSession::getVar('sess_challenge'));
// copying basket object
$this->_oBasket = clone $oBasket;
// delete it from the session
$oBasket->deleteBasket();
oxSession::deleteVar('sess_challenge');
}
示例9: init
public function init()
{
parent::init();
$this->_initialized = true;
}
示例10: init
/**
* Executes parent::init(), Loads user chosen product object (with all data).
*
* @return null
*/
public function init()
{
if (oxConfig::getParameter('recommid') && !$this->getActiveRecommList()) {
oxUtils::getInstance()->redirect($this->getConfig()->getShopHomeURL(), true, 302);
}
oxUBase::init();
}