title = lang("{$this->getService()->class_path}.title"); $this->helper = new AuditLogHelper(); } protected function getModel(): AuditLogModel { if ($this->_model === null) { $this->_model = new AuditLogModel(); } return $this->_model; } protected function getService(): AuditLogService { if ($this->service === null) { $this->service = new AuditLogService(); } return $this->service; } private function init(string $action, array $fields = []): void { $this->action = $action; $this->fields = count($fields) ? $fields : ['zone_name', $this->getModel()::TITLE, 'action_info', 'actor', 'interface', 'status', 'updated_at', 'created_at']; $this->field_rules = $this->getModel()->getFieldRules($this->action, $this->fields); $this->filter_fields = []; $this->field_options = $this->getFormFieldOptions($this->filter_fields); $this->batchjob_fields = []; } //View public function view(string $uid): RedirectResponse|string { $this->init(__FUNCTION__, ['zone_name', $this->getModel()::TITLE, 'actor', 'action_info', 'interface', 'meta', 'resource', 'status', 'updated_at', 'created_at']); return $this->view_procedure($uid); } // 리스트 protected function list_entitys_process(): array { //기본Soring처리 $this->getModel()->orderBy("created_at DESC,zone_name ASC"); return parent::list_entitys_process(); } public function index(): string { $this->init(__FUNCTION__); return $this->list_procedure(); } // Download public function download(string $output_type, mixed $uid = false): DownloadResponse|string { $this->init(__FUNCTION__); return $this->download_procedure($output_type, $uid); } }