public function afterDelete() { //log information to admin_log table $adminName = Yii::$app->user->identity->username; Buuug7Util::saveInfoToAdminLogTable("{$adminName}删除了一个管理员({$this->username})"); Yii::$app->commandBus->handle(new AddToTimelineCommand(['category' => 'user', 'event' => 'delete', 'data' => ['public_identity' => $this->getPublicIdentity(), 'user_id' => $this->getId(), 'delete_time' => time(), 'by_user' => Yii::$app->user->identity->username]])); parent::afterDelete(); }