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