summaryrefslogtreecommitdiff
path: root/demos/blog-tutorial/samples/day3/blog/protected/layouts/MainLayout.php
blob: 46c1483d5245ec3ba563c7bb43d2e65418216cea (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);
	}
}

?>