本文整理汇总了PHP中Controller_Template::after方法的典型用法代码示例。如果您正苦于以下问题:PHP Controller_Template::after方法的具体用法?PHP Controller_Template::after怎么用?PHP Controller_Template::after使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Controller_Template
的用法示例。
在下文中一共展示了Controller_Template::after方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: after
function after()
{
if (class_exists('DebugToolbar')) {
echo DebugToolbar::render();
}
return parent::after();
}
示例2: after
/**
* After action
*/
public function after()
{
$this->template->legend = HTML::chars(__($this->config_mod['b_menu']['heading'])) . SEPARATOR . HTML::chars($this->title);
$this->template->v_nav_top = View::factory('backend/v_nav_top');
$this->template->v_nav_left = View::factory('backend/v_nav_left', ['panels' => Module::get_panels(), 'current' => $this->config_mod['cms_module']]);
parent::after();
}
示例3: after
public function after()
{
if (!isset($this->template->heading)) {
$this->template->heading = ucfirst($this->request->controller());
}
if (!isset($this->template->subheading)) {
$this->template->subheading = ucfirst($this->request->action());
}
$session_messages = $this->session->get_once('messages');
if ($session_messages) {
$this->template->messages = array_merge($session_messages, $this->template->messages);
}
$session_errors = $this->session->get_once('errors');
if ($session_errors) {
$this->template->errors = array_merge($session_errors, $this->template->errors);
}
/* Are you logged in? */
$this->template->set_global('isLoggedIn', $this->auth->is_logged_in());
$this->template->set_global('isVerifiedAccount', isset($this->isVerifiedAccount) ? $this->isVerifiedAccount : FALSE);
/* store the user */
$this->template->set_global('account', $this->auth->getAccount());
if ($this->template->isLoggedIn) {
$this->addMenuItem(array('url' => 'convention/checkout', 'title' => 'Purchase Tickets'));
$this->addMenuItem(array('title' => 'My Account', 'url' => 'user'));
if ($this->auth->hasPermission('admin')) {
$this->addMenuItem(array('title' => 'Administration', 'url' => 'admin'));
}
$this->addMenuItem(array('url' => 'user/logout', 'title' => 'Logout'));
}
return parent::after();
}
示例4: after
/**
* Unset current navigation item
*/
public function after()
{
$key = array_search($this->_current_nav, $this->_config['menu']);
if ($key) {
$this->_config['menu'][$key] = NULL;
}
// If a submenu is defined
if (isset($this->_config['submenu'][$this->_current_nav])) {
// Unset current action sublink
$key = array_search($this->request->action, $this->_config['submenu'][$this->_current_nav]);
if ($key === FALSE) {
// Match controler and action
$key = array_search($this->request->controller . "/" . $this->request->action, $this->_config['submenu'][$this->_current_nav]);
if ($key === FALSE) {
// Match controler only (if a submenu belong to many actions)
$key = array_search($this->request->controller, $this->_config['submenu'][$this->_current_nav]);
}
}
if ($key) {
$this->_config['submenu'][$this->_current_nav][$key] = NULL;
}
// Prepend current navigation path to all menu's actions
foreach ($this->_config['submenu'][$this->_current_nav] as $key => $action) {
if (!empty($action)) {
$this->_config['submenu'][$this->_current_nav][$key] = $this->_current_nav . '/' . $action;
}
}
}
parent::after();
}
示例5: after
public function after($response)
{
if (empty($response) or !$response instanceof Response) {
$response = \Response::forge(\Theme::instance()->render());
}
return parent::after($response);
}
示例6: after
/**
* After action
*/
public function after()
{
$this->template->breadcrumbs = $this->breadcrumbs;
$v_go_previous = View::factory('frontend/v_go_previous');
$this->template->set_global('v_go_previous', $v_go_previous);
parent::after();
}
示例7: after
public function after()
{
if ($this->template->body && is_string($this->template->body)) {
$this->template->body = View::factory($this->template->body, $this->data, false);
}
parent::after();
}
示例8: after
public function after()
{
if (empty($this->template->content)) {
$this->template->content = '';
}
parent::after();
}
示例9: after
/**
* The after() method is called after your controller action.
* In our template controller we override this method so that we can
* make any last minute modifications to the template before anything
* is rendered.
*/
public function after()
{
if ($this->auto_render) {
$this->template->styles = array_merge($this->config['global']['css_files'], $this->template->styles);
$this->template->scripts = array_merge($this->config['global']['js_files'], $this->template->scripts);
}
parent::after();
}
示例10: after
/**
* Perform pre-render actions on website controller
*/
public function after()
{
if ($this->internal_request) {
$content = $this->template->content;
$this->template = $content;
}
parent::after();
}
示例11: after
public function after($response)
{
$response = parent::after($response);
// not needed if you create your own response object
// do stuff
return $response;
// make sure after() returns the response object
}
示例12: after
public function after()
{
if (is_object($this->template)) {
$this->template->scripts = $this->scripts;
$this->template->css = $this->css;
}
parent::after();
}
示例13: after
/**
* Unset current navigation item
*/
public function after()
{
$key = array_search($this->_current_nav, $this->_config['menu']);
if ($key) {
$this->_config['menu'][$key] = NULL;
}
parent::after();
}
示例14: after
public function after()
{
$referrer = Request::current()->referrer();
if ($referrer === NULL or $_SERVER['HTTP_HOST'] != parse_url($referrer, PHP_URL_HOST)) {
$referrer = URL::base();
}
$this->template->set('ASSETS', $this->assets)->set('BACK_URL', $referrer);
parent::after();
}
示例15: after
public function after()
{
$this->template->styles = array_merge($this->template->styles, $this->theme_config['styles']);
$this->template->scripts = array_merge($this->template->scripts, $this->theme_config['jscripts']);
View::set_global(array('title' => !isset($this->template->title) ? $this->config->get('title_admin') : $this->template->title, 'theme_dir' => '/themes/' . $this->config->get('admin_theme') . '', 'user' => $this->user, 'error' => Session::instance()->get('error'), 'message' => Session::instance()->get('message'), 'admin_url' => $this->config->get('admin_url')));
Session::instance()->set('message', '');
Session::instance()->set('error', '');
parent::after();
}