class_name = "Admin/User"; $this->layout = LAYOUTS['admin']; $this->title = lang("{$this->class_name}.title"); $this->session = $this->session_AuthTrait(); helper($this->class_name); } protected function getModel(): UserModel { if ($this->_model === null) { $this->_model = new UserModel(); } return $this->_model; } protected function create_init(): void { // $this->fields = [$this->getModel()::TITLE, 'apikey', 'status']; $this->filter_fields = ['status']; $this->action = DB_ACTION["CREATE"]; $this->getModel()->setAction($this->action); } public function create_form(): RedirectResponse|string { return $this->create_form_process(); } protected function create_process_submit(): UserEntity { $user = new User(); return $user->create($this->formDatas); } public function create(): RedirectResponse { return parent::create_process(); } }