CrudKit\Pages\BasicDataPage::handle_get_form_values PHP Method

handle_get_form_values() public method

    public function handle_get_form_values()
    {
        $url = new UrlHelper();
        $item_id = $url->get("item_id", null);
        if ($item_id === "_ck_new") {
            return array('type' => 'json', 'data' => array('schema' => $this->dataProvider->getSchema(), 'values' => array()));
        }
        return array('type' => 'json', 'data' => array('schema' => $this->dataProvider->getSchema(), 'values' => $this->dataProvider->getRow($item_id)));
    }