本文整理汇总了PHP中PageController::setLayout方法的典型用法代码示例。如果您正苦于以下问题:PHP PageController::setLayout方法的具体用法?PHP PageController::setLayout怎么用?PHP PageController::setLayout使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PageController
的用法示例。
在下文中一共展示了PageController::setLayout方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: prepare_company_website_controller
/**
* Set internals of specific company website controller
*
* @access public
* @param PageController $controller
* @param string $layout Project or company website layout. Or any other...
* @return null
*/
function prepare_company_website_controller(PageController $controller, $layout = 'website') {
if (defined('CONSOLE_MODE') && CONSOLE_MODE) return;
// If we don't have logged user prepare referer params and redirect user to login page
if(!(logged_user() instanceof Contact)) {
$ref_params = array();
foreach($_GET as $k => $v) $ref_params['ref_' . $k] = $v;
$controller->redirectTo('access', 'login', $ref_params);
} // if
$controller->setLayout($layout);
$controller->addHelper('form', 'breadcrumbs', 'pageactions', 'tabbednavigation', 'company_website', 'project_website', 'textile', 'dimension');
} // prepare_company_website_controller
示例2: array
/**
* Set internals of specific company website controller
*
* @access public
* @param PageController $controller
* @param string $layout Project or company website layout. Or any other...
* @return null
*/
function prepare_company_website_controller(PageController $controller, $layout = 'dashboard') {
// If we don't have logged user prepare referer params and redirect user to login page
if (!(logged_user() instanceof User)) {
$ref_params = array();
foreach ($_GET as $k => $v) {
$ref_params['ref_' . $k] = $v;
}
trace(__FILE__, 'prepare_company_website_controller(): not logged in, redirect');
$controller->redirectTo('access', 'login', $ref_params);
} // if
$controller->setLayout($layout);
$controller->addHelper('breadcrumbs');
$controller->addHelper('pageactions');
$controller->addHelper('tabbednavigation');
$controller->addHelper('company_website');
$controller->addHelper('project_website');
} // prepare_company_website_controller
示例3: prepare_company_website_controller
/**
* Set internals of specific company website controller
*
* @access public
* @param PageController $controller
* @param string $layout Project or company website layout. Or any other...
* @return null
*/
function prepare_company_website_controller(PageController $controller, $layout = 'website')
{
// If we don't have logged user prepare referer params and redirect user to login page
if (!logged_user() instanceof User) {
$ref_params = array();
foreach ($_GET as $k => $v) {
$ref_params['ref_' . $k] = $v;
}
$controller->redirectTo('access', 'login', $ref_params);
}
// if
$controller->setLayout($layout);
$controller->addHelper('form', 'breadcrumbs', 'pageactions', 'tabbednavigation', 'company_website', 'project_website', 'textile');
}