title = lang("Mylog.title"); $this->helper = new MyLogHelper(); } protected function getService(): MyLogService { if ($this->service === null) { $this->service = new MyLogService(); } return $this->service; } public function getUserModel(): UserModel { if ($this->_userModel === null) { $this->_userModel = new UserModel(); } return $this->_userModel; } protected function getFormFieldOption(string $field, array $options = []): array { switch ($field) { case 'user_uid': // $this->getUserModel()->where('status', DEFAULTS['STATUS']); $options[$field] = $this->getUserModel()->getFormFieldOption($field); // echo $this->getUserModel()->getLastQuery(); // dd($options); break; default: $options = parent::getFormFieldOption($field, $options); break; } return $options; } //View public function view(int $uid): RedirectResponse|string { $this->init(__FUNCTION__, ['user_uid', 'class_name', 'method_name', $this->getService()->getModel()::TITLE, 'created_at', 'content']); return $this->view_procedure($uid); } // 리스트 public function index(): string { $this->init(__FUNCTION__); return $this->list_procedure(); } }