本文整理匯總了PHP中Page_Controller::getViewer方法的典型用法代碼示例。如果您正苦於以下問題:PHP Page_Controller::getViewer方法的具體用法?PHP Page_Controller::getViewer怎麽用?PHP Page_Controller::getViewer使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Page_Controller
的用法示例。
在下文中一共展示了Page_Controller::getViewer方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getViewer
function getViewer($action)
{
// If there is no dynamic template, or it doesn't contain
// SSViewer templates, use default handling.
if (!$this->customTemplates) {
return parent::getViewer($action);
}
// @todo: Handle all cases that can come out in the templates
// for an action. Determine error handling if action is not handled,
// and index is not present.
return new SSDynamicViewer($this->customTemplates);
}
示例2: getViewer
/**
* Return an SSViewer object to process the data
* Manipulates the SSViewer in case of a product detail view.
*
* @param string $action Action
*
* @return SSViewer The viewer identified being the default handler for this Controller/Action combination
*/
public function getViewer($action)
{
$viewer = parent::getViewer($action);
if ($this->isProductDetailView()) {
$this->ProductDetailRequirements();
$templates = $viewer->templates();
$viewer = new SSViewer(array('SilvercartProductPage', basename($templates['main'], '.ss')));
}
return $viewer;
}