本文整理汇总了PHP中ContentController::renderWith方法的典型用法代码示例。如果您正苦于以下问题:PHP ContentController::renderWith方法的具体用法?PHP ContentController::renderWith怎么用?PHP ContentController::renderWith使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ContentController
的用法示例。
在下文中一共展示了ContentController::renderWith方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: executeURL
/**
* executes payment: redirects to Authorize.net
*
* @param Object $obj
*
*/
protected function executeURL($obj)
{
Requirements::clear();
Requirements::javascript(THIRDPARTY_DIR . "/jquery/jquery.js");
$page = new Page();
if ($obj->fingerprint) {
$page->Title = 'Redirection to Authorize.Net...';
$logoLink = $this->Config()->get("logo_link");
$page->Logo = "";
if ($logoLink) {
$page->Logo = '<img src="' . $logoLink . '" alt="Payments powered by Authorize.Net" />';
}
$page->Form = $this->AuthorizeDotNetForm($obj);
$controller = new ContentController($page);
//Requirements::block(THIRDPARTY_DIR."/jquery/jquery.js");
//Requirements::javascript(Director::protocol()."ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js");
return new Payment_Processing($controller->renderWith('PaymentProcessingPage'));
} else {
$page->Title = 'Sorry, Authorize.Net can not be contacted at the moment ...';
$page->Logo = '';
$page->Form = 'Sorry, an error has occurred in contacting the Payment Processing Provider (Authorize.Net), please try again in a few minutes or contact the website provider...';
$controller = new ContentController($page);
//Requirements::block(THIRDPARTY_DIR."/jquery/jquery.js");
//Requirements::javascript(Director::protocol()."ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js");
return new Payment_Failure($controller->renderWith('PaymentProcessingPage'));
}
}
示例2: executeURL
function executeURL($url)
{
$url = str_replace("&", "&", $url);
$url = str_replace("&&", "&", $url);
//$url = str_replace("==", "", $url);
if ($url) {
/**
* build redirection page
**/
$page = new Page();
$page->Title = 'Redirection to DPS...';
$page->Logo = '<img src="' . $this->config()->get("logo") . '" alt="Payments powered by DPS"/>';
$page->Form = $this->DPSForm($url);
$controller = new ContentController($page);
Requirements::clear();
Requirements::javascript(THIRDPARTY_DIR . "/jquery/jquery.js");
//Requirements::block(THIRDPARTY_DIR."/jquery/jquery.js");
//Requirements::javascript(Director::protocol()."ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js");
return new Payment_Processing($controller->renderWith('PaymentProcessingPage'));
} else {
$page = new Page();
$page->Title = 'Sorry, DPS can not be contacted at the moment ...';
$page->Logo = 'Sorry, an error has occured in contacting the Payment Processing Provider, please try again in a few minutes...';
$page->Form = $this->DPSForm($url);
$controller = new ContentController($page);
Requirements::javascript(THIRDPARTY_DIR . "/jquery/jquery.js");
//Requirements::block(THIRDPARTY_DIR."/jquery/jquery.js");
//Requirements::javascript(Director::protocol()."ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js");
return new Payment_Failure($controller->renderWith('PaymentProcessingPage'));
}
}