Ejemplo n.º 1
0
 /**
  * Initialize class.
  * Search all events in modules and cache them.
  * @static
  */
 public static function init()
 {
     self::$initialized = true;
     SystemModules::loadEventsFile();
     foreach (SystemModules::getInstalled() as $module) {
         $className = ucfirst($module->name) . 'ModuleEvents';
         if (class_exists($className, false)) {
             self::loadEventsClass($className);
         }
     }
 }
Ejemplo n.º 2
0
 /**
  * Initialize component
  */
 public function init()
 {
     SModelEventManager::attachEvents($this);
 }