1 <?php
2 /**
3 * Class File
4 *
5 * @author Tobias Munk <schmunk@usrbin.de>
6 * @link http://www.phundament.com/
7 * @copyright Copyright © 2005-2010 diemeisterei GmbH
8 * @license http://www.phundament.com/license/
9 */
10 /**
11 * Description ...
12 *
13 * Detailed info
14 * <pre>
15 * <?php
16 * $this->widget(
17 * 'p3widgets.components.P3WidgetContainer',
18 * array(
19 * 'id'=>'main',
20 * #'checkAccess'=>false //disables checkAccess feature
21 * )
22 * );
23 * ?>
24 * </pre>
25 * {@link DefaultController}
26 *
27 * @author Tobias Munk <schmunk@usrbin.de>
28 * @version $Id$
29 * @package p3widgets
30 * @since 3.0
31 */
32 class P3WidgetsModule extends CWebModule
33 {
34
35 public $adminRole = 'admin';
36
37 public function init()
38 {
39 // this method is called when the module is being created
40 // you may place code here to customize the module or the application
41
42 // import the module-level models and components
43 $this->setImport(array(
44 'p3widgets.models.*',
45 'p3widgets.components.*',
46 ));
47 }
48
49 public function beforeControllerAction($controller, $action)
50 {
51 if(parent::beforeControllerAction($controller, $action))
52 {
53 // this method is called before any module controller action is performed
54 // you may place customized code here
55 return true;
56 }
57 else
58 return false;
59 }
60 }
61