public function editAction() { $entity = $this->entity; $item = $entity::createById(@$_GET['id']); $formData = new FormData($this->editFields); $formData->setValues($item); $this->beforeEditOrAdd($item, $formData); $formType = 'Edit'; $formAction = $this->url('edit-submit', ['id' => $item->id]); $this->pageTitle = 'Edit ' . $this->noun; $message = @$_GET['message']; $this->display($this->editTpl, get_defined_vars()); }
public function editAction() { $entity = $this->entity; $item = $entity::createById(@$_GET['id']); $formData = new FormData($this->editFields); $formData->setValues($item); $this->beforeEditOrAdd($item, $formData); $formType = 'Edit'; $formAction = $this->url('edit-submit', ['id' => $item->id]); $this->pageTitle = 'Edit ' . $this->noun; $this->prepareSidebarList(); $displayField = array_keys($this->listFields)[0]; $crudContentTpl = $this->editTpl; $this->display('admin-pages.tpl', get_defined_vars()); }