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

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

public handle_new_item ( )
    public function handle_new_item()
    {
        if ($this->app->isReadOnly()) {
            throw new Exception("Read Only");
        }
        $twig = new TwigUtil();
        $form = $this->dataProvider->getEditForm();
        $form->setPageId($this->getId());
        $form->setNewItem();
        $formContent = $form->render($this->dataProvider->getEditFormOrder());
        $templateData = array('page' => $this, 'name' => $this->name, 'editForm' => $formContent);
        return $twig->renderTemplateToString("pages/basicdata/edit_item.twig", $templateData);
    }