本文整理汇总了PHP中BaseController::render方法的典型用法代码示例。如果您正苦于以下问题:PHP BaseController::render方法的具体用法?PHP BaseController::render怎么用?PHP BaseController::render使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BaseController
的用法示例。
在下文中一共展示了BaseController::render方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: render
function render()
{
if (uri_string() != "/admin/login") {
$this->slots['content'] .= '<p>' . anchor("admin/logout", 'Log out') . '</p>';
}
parent::render();
}
示例2: render
public function render($path, $param = [], $setting = [])
{
$predefinedSettings = ['title' => $this->setTitle()];
if ($this->exists()) {
$predefinedSettings = array_merge($predefinedSettings, ['design' => $this->game->present()->readDesign()]);
}
$settings = array_merge($predefinedSettings, $setting);
return parent::render('game.profile.layout', ['content' => $this->theme->section($path, $param)], $settings);
}
示例3: render
public function render($path, $param = [], $setting = [])
{
$predefinedSettings = ['title' => $this->setTitle()];
if ($this->exists()) {
$predefinedSettings = array_merge($predefinedSettings, ['design' => $this->community->present()->readDesign()]);
}
$settings = array_merge($predefinedSettings, $setting);
if (\Config::get('page-design') and isset($settings['design'])) {
extract($settings['design']);
$bgImage = !empty($bg_image) ? 'background-image:url(' . \Image::url($bg_image) . ');' : null;
$this->theme->asset()->afterStyleContent("\n body{\n " . $bgImage . "\n background-position: " . $bg_position . ";\n background-color: " . $bg_color . ";\n background-repeat: " . $bg_repeat . ";\n background-attachment : " . $bg_attachment . ";\n }\n\n a {\n color : " . $link_color . ";\n }\n\n .page-content{\n background-color: " . $content_bg_color . ";\n }\n ");
}
return parent::render('community.page.layout', ['content' => $this->theme->section($path, $param)], $settings);
}
示例4: render
public function render($tpl, $params = [])
{
if ($this->_userinfo['roled'] == 3) {
$params['menus_list'] = $this->_menus;
} else {
$params['menus_list'] = array();
foreach ($this->_menus as $key => $item) {
if (!in_array($item['action'], array('anchor', 'live', 'withdraw', 'roomset'))) {
$params['menus_list'][] = $item;
}
}
}
return parent::render($tpl, $params);
}
示例5: render
public function render($path, $param = [], $setting = [])
{
$predefinedSettings = [];
if (\Auth::check()) {
/**
* If there is login we help this user to design his page
*/
$predefinedSettings = array_merge($predefinedSettings, ['design' => \Auth::user()->present()->readDesign()]);
}
$settings = array_merge($predefinedSettings, $setting);
if (\Config::get('page-design') and isset($settings['design'])) {
extract($settings['design']);
$bgImage = !empty($bg_image) ? 'background-image:url(' . \Image::url($bg_image) . ');' : 'background-image : none';
$this->theme->asset()->afterStyleContent("\n body{\n " . $bgImage . "\n background-position: " . $bg_position . ";\n background-color: " . $bg_color . ";\n background-repeat: " . $bg_repeat . ";\n background-attachment : " . $bg_attachment . ";\n }\n\n a {\n color : " . $link_color . ";\n }\n\n .page-content{\n background-color: " . $content_bg_color . ";\n }\n ");
}
return parent::render($path, $param, $settings);
}
示例6: AltoRouter
<?php
$router = new AltoRouter();
//example
//$router->map( 'GET', '/customer/[i:id]/', 'CustomerController#getData' );
$match = $router->match();
if ($match) {
//check if its a static file
if (is_file("app/template/" . $match['target'])) {
include_once "app/template/" . $match['target'];
}
if (strpos($match['target'], "#")) {
list($object, $method) = explode("#", $match['target']);
$view = new $object();
$view->{$method}($match['params']);
}
} else {
header("HTTP/1.0 404.php Not Found");
$error = new BaseController();
$error->assign("title", "404");
$error->render("404.php");
}
示例7: updateProfileAction
public function updateProfileAction()
{
session_start();
parent::render('updateProfile');
if (isset($_POST['update'])) {
$user = new UserModel();
if ($user->updateProfile() === true) {
echo "Records Updated Successfully!!";
} else {
echo "Not updated";
}
}
if (isset($_POST['change_password'])) {
$user = new UserModel();
if ($user->updatePassword() === true) {
echo "Password Updated Successfully!!";
} else {
echo "Password cannot changed";
}
}
}
示例8: render
function render()
{
$this->slots['content'] = $this->load->view('blog/skeleton', $this->slots, true);
parent::render();
}
示例9: accessAction
/**
*@return void
*
*/
public function accessAction()
{
parent::render('adminPage');
}
示例10: startAction
/**
*rendring the home page
*/
public function startAction()
{
parent::render("home");
}