本文整理汇总了PHP中oxUBase::render方法的典型用法代码示例。如果您正苦于以下问题:PHP oxUBase::render方法的具体用法?PHP oxUBase::render怎么用?PHP oxUBase::render使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类oxUBase
的用法示例。
在下文中一共展示了oxUBase::render方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: render
public function render()
{
parent::render();
$this->createJsonFile();
$this->getLocation();
return $this->_sThisTemplate;
}
示例2: render
public function render()
{
/** @var $oRakuten rakuten_checkout */
$oRakuten = oxNew('rakuten_checkout');
// Check which method will be used: Standard or Inline
if ($this->getConfig()->getShopConfVar('sRakutenIntegrationMethod', -1) == 'STANDARD') {
// Redirect to Rakuten Checkout
if ($redirectUrl = $oRakuten->getRedirectUrl()) {
// Received redirect URL
oxUtils::getInstance()->redirect($redirectUrl, false, 302);
} else {
// Error returned, redirecting to the shopping cart
oxUtils::getInstance()->redirect($this->_getBasketUrl(), false, 302);
}
} elseif ($this->getConfig()->getShopConfVar('sRakutenIntegrationMethod', -1) == 'INLINE') {
// Inline integration (iFrame)
if ($inlineCode = $oRakuten->getRedirectUrl(true)) {
// Loading iFrame
$this->_aViewData['oxidBlock_content'][] = $inlineCode;
return parent::render();
} else {
// Error returned, redirecting to the shopping cart
oxUtils::getInstance()->redirect($this->_getBasketUrl(), false, 302);
}
} else {
// Unknown integration method
oxUtilsView::getInstance()->addErrorToDisplay('Unknown integration method.');
oxUtils::getInstance()->redirect($this->_getBasketUrl(), false, 302);
}
return false;
}
示例3: render
/**
* Ueberladen die Render
*
* @author Rafal Wesolowski
* @return string
*/
public function render()
{
parent::render();
$this->_aViewData["sOxid"] = $sOxid = oxConfig::getParameter("oxid");
$this->_getModulesAnalize();
$this->_aViewData["sView"] = __CLASS__;
return $this->_sThisTemplate;
}
示例4: render
/**
* If tags are ON - returns parent::render() value, else - displays 404
* page, as tags are off
*
* @return string
*/
public function render()
{
// if tags are off - showing 404 page
if (!$this->showTags()) {
error_404_handler();
}
return parent::render();
}
示例5: render
/**
* Standard render function
*/
public function render()
{
parent::render();
$this->_debug = oxRegistry::getConfig()->getRequestParameter("debug");
$this->setArticlesHidden();
$this->setArticlesVisible();
// do not return template name, just die...
exit;
}
示例6: render
/**
* Executes parent method parent::render(), returns name of template file.
*
* @return string $sTplName template file name
*/
public function render()
{
parent::render();
// security fix so that you cant access files from outside template dir
$sTplName = basename((string) oxRegistry::getConfig()->getRequestParameter("tpl"));
if ($sTplName) {
$sTplName = 'custom/' . $sTplName;
}
return $sTplName;
}
示例7: render
/**
* Executes parent::render(), if invitation is disabled - redirects to main page
*
* @return string
*/
public function render()
{
$oConfig = $this->getConfig();
if (!$oConfig->getConfigParam("blInvitationsEnabled")) {
oxUtils::getInstance()->redirect($oConfig->getShopHomeURL());
return;
}
parent::render();
return $this->_sThisTemplate;
}
示例8: render
/**
* Renders error screen
*
* @return string
*/
public function render()
{
parent::render();
$errorNumber = oxRegistry::getConfig()->getRequestParameter('execerror');
$templates = $this->getErrorTemplates();
if (array_key_exists($errorNumber, $templates)) {
return $templates[$errorNumber];
} else {
return 'message/err_unknown.tpl';
}
}
示例9: render
/**
* Executes parent::render(), loads article list according active tag
*
* @return string $this->_sThisTemplate current template file name
*/
public function render()
{
oxUBase::render();
$oArticleList = $this->getArticleList();
// if tags are off or no articles - showing 404 header (#2139)
if (!$this->showTags() || !$oArticleList) {
error_404_handler();
}
// processing list articles
$this->_processListArticles();
return $this->_sThisTemplate;
}
示例10: render
/**
* Loads delivery, deliveryset list info and returns name of template file
* to render info::_sThisTemplate. If no template name specified - will
* load "impressum" content
*
* @return string $this->_sThisTemplate current template file name
*/
public function render()
{
parent::render();
if (!$this->getTemplateName()) {
// get default page
$oContent = $this->getContent();
$this->getViewConfig()->setViewConfigParam('tpl', $oContent->getId());
$this->_sThisTemplate = 'page/info/content.tpl';
} else {
$this->getViewConfig()->setViewConfigParam('tpl', $this->getTemplateName());
}
return $this->_sThisTemplate;
}
示例11: render
/**
* Renders error screen
*
* @return string
*/
public function render()
{
parent::render();
$sErrorNo = oxConfig::getParameter('execerror');
$sTemplate = '';
if ($sErrorNo == 'unknown') {
$sTemplate = 'message/err_unknown.tpl';
}
if ($sTemplate) {
return $sTemplate;
} else {
return 'start.tpl';
}
}
示例12: render
/**
* Renders error screen
*
* @return string
*/
public function render()
{
parent::render();
$sErrorNo = oxRegistry::getConfig()->getRequestParameter('execerror');
$sTemplate = '';
if ($sErrorNo == 'unknown') {
$sTemplate = 'message/err_unknown.tpl';
}
if ($sTemplate) {
return $sTemplate;
} else {
return 'message/err_unknown.tpl';
}
}
示例13: render
public function render()
{
parent::render();
if ($this->err == 'API KEY INVALID') {
oxRegistry::getUtils()->setHeader("HTTP/1.0 401 Unauthorized");
}
oxRegistry::getUtils()->setHeader("Content-Type: application/json; charset=" . oxRegistry::getLang()->translateString("charset"));
$oSmarty = oxRegistry::get("oxUtilsView")->getSmarty();
$this->_aViewData['errmsg'] = $this->err;
$this->_aViewData['haserror'] = $this->err !== false;
$this->_aViewData['data'] = $this->data;
foreach (array_keys($this->_aViewData) as $sViewName) {
$oSmarty->assign_by_ref($sViewName, $this->_aViewData[$sViewName]);
}
oxRegistry::getUtils()->showMessageAndExit($oSmarty->fetch($this->_sThisTemplate, $this->getViewId()));
}
示例14: render
/**
* Renders requested RSS feed
*
* Template variables:
* <b>rss</b>
*/
public function render()
{
parent::render();
$oSmarty = oxRegistry::get("oxUtilsView")->getSmarty();
// #2873: In demoshop for RSS we set php_handling to SMARTY_PHP_PASSTHRU
// as SMARTY_PHP_REMOVE removes not only php tags, but also xml
if ($this->getConfig()->isDemoShop()) {
$oSmarty->php_handling = SMARTY_PHP_PASSTHRU;
}
foreach (array_keys($this->_aViewData) as $sViewName) {
$oSmarty->assign_by_ref($sViewName, $this->_aViewData[$sViewName]);
}
// return rss xml, no further processing
$sCharset = oxRegistry::getLang()->translateString("charset");
oxRegistry::getUtils()->setHeader("Content-Type: text/xml; charset=" . $sCharset);
oxRegistry::getUtils()->showMessageAndExit($this->_processOutput($oSmarty->fetch($this->_sThisTemplate, $this->getViewId())));
}
示例15: render
/**
* Renders requested RSS feed
*
* Template variables:
* <b>rss</b>
*
* @return string $this->_sThisTemplate current template file name
*/
public function render()
{
parent::render();
$oSmarty = oxUtilsView::getInstance()->getSmarty();
// #2873: In demoshop for RSS we set php_handling to SMARTY_PHP_PASSTHRU
// as SMARTY_PHP_REMOVE removes not only php tags, but also xml
if ($this->getConfig()->isDemoShop()) {
$oSmarty->php_handling = SMARTY_PHP_PASSTHRU;
}
foreach (array_keys($this->_aViewData) as $sViewName) {
$oSmarty->assign_by_ref($sViewName, $this->_aViewData[$sViewName]);
}
// variables are set as deprecated, use getters
// $oSmarty->assign('xmldef', $this->getXmlDef());
// return rss xml, no further processing
oxUtils::getInstance()->setHeader("Content-Type: text/xml; charset=" . oxLang::getInstance()->translateString("charset"));
oxUtils::getInstance()->showMessageAndExit($this->_processOutput($oSmarty->fetch($this->_sThisTemplate, $this->getViewId())));
}