1: <?php
2:
3: /**
4: * This file is part of the Nette Framework (http://nette.org)
5: *
6: * Copyright (c) 2004 David Grudl (http://davidgrudl.com)
7: *
8: * For the full copyright and license information, please view
9: * the file license.txt that was distributed with this source code.
10: */
11:
12: namespace Nette\Security\Diagnostics;
13:
14: use Nette,
15: Nette\Diagnostics\Helpers;
16:
17:
18: /**
19: * User panel for Debugger Bar.
20: *
21: * @author David Grudl
22: */
23: class UserPanel extends Nette\Object implements Nette\Diagnostics\IBarPanel
24: {
25: /** @var Nette\Security\User */
26: private $user;
27:
28:
29: public function __construct(Nette\Security\User $user)
30: {
31: $this->user = $user;
32: }
33:
34:
35: /**
36: * Renders tab.
37: * @return string
38: */
39: public function getTab()
40: {
41: ob_start();
42: require __DIR__ . '/templates/UserPanel.tab.phtml';
43: return ob_get_clean();
44: }
45:
46:
47: /**
48: * Renders panel.
49: * @return string
50: */
51: public function getPanel()
52: {
53: ob_start();
54: require __DIR__ . '/templates/UserPanel.panel.phtml';
55: return ob_get_clean();
56: }
57:
58: }
59: