CrudKit\Pages\BasicDataPage::handle_edit_item PHP Метод

handle_edit_item() публичный Метод

public handle_edit_item ( )
    public function handle_edit_item()
    {
        if ($this->app->isReadOnly()) {
            throw new Exception("Read Only");
        }
        $twig = new TwigUtil();
        $url = new UrlHelper();
        $rowId = $url->get("item_id", null);
        $form = $this->dataProvider->getEditForm();
        $form->setPageId($this->getId());
        $form->setItemId($rowId);
        $route = new RouteGenerator();
        $deleteUrl = $route->itemFunc($this->getId(), $rowId, "delete_item");
        $formContent = $form->render($this->dataProvider->getEditFormOrder());
        $templateData = array('page' => $this, 'name' => $this->name, 'editForm' => $formContent, 'rowId' => $rowId, 'canDelete' => true, 'deleteUrl' => $deleteUrl);
        return $twig->renderTemplateToString("pages/basicdata/edit_item.twig", $templateData);
    }