Exemplo n.º 1
0
 /**
  * Initialize class.
  * Search all events in modules and cache them.
  * @static
  */
 public static function init()
 {
     self::$initialized = true;
     self::loadEventsFile();
     foreach (Yii::app()->getModules() as $mid => $module) {
         $className = ucfirst($mid) . 'ModuleEvents';
         if (class_exists($className, false)) {
             self::loadEventsClass($className);
         }
     }
 }
Exemplo n.º 2
0
 public function init()
 {
     Yii::import('app.managers.CManagerModelEvent');
     CManagerModelEvent::attachEvents($this);
 }