/**
  * eventList for BootstrapManager
  * @return array
  */
 public static function eventList($appId = 'frontend')
 {
     // (frontentd and common) or (backend and common) events
     $cond = $appId == 'backend' ? '>=' : '<=';
     $attributes = ['trigger_class', 'trigger_event', 'plugin_id', 'pos', 'handler_method'];
     // handler_class
     $order = array_combine($attributes, array_fill(0, count($attributes), SORT_ASC));
     $allEvents = self::find()->select('t.*')->from(self::tableName() . 'AS t')->joinWith(['plugin'])->where(['t.status' => self::STATUS_ACTIVE, Item::tableName() . '.status' => Item::STATUS_ACTIVE])->andWhere([$cond, 't.app_id', App::APP_COMMON])->orderBy($order)->all();
     $result = [];
     foreach ($allEvents as $data) {
         if ($data->data) {
             $handler = [[$data->plugin->handler_class, $data->handler_method], json_decode($data->data, true)];
         } else {
             $handler = [$data->plugin->handler_class, $data->handler_method];
         }
         $result[$data->trigger_class][$data->trigger_event][] = $handler;
     }
     return $result;
 }