summaryrefslogtreecommitdiff
path: root/demos/blog-tutorial/samples/day3/blog/protected/layouts/MainLayout.php
blob: f605f75c90453eb7f3edf9226734e963a7050d7b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?php

class MainLayout extends TTemplateControl
{
	/**
	 * Logs out a user.
	 * This method responds to the "logout" button's OnClick event.
	 * @param mixed event sender
	 * @param mixed event parameter
	 */
	public function logoutButtonClicked($sender,$param)
	{
		$this->Application->getModule('auth')->logout();
		$url=$this->Service->constructUrl($this->Service->DefaultPage);
		$this->Response->redirect($url);
	}
}

?>