/** * prepareRender * * @param \Windwalker\Data\Data $data * * @return void */ protected function prepareData($data) { parent::prepareData($data); // TODO: Test if we need a exception or not. $model = $this->model->getModel(); if (!$model instanceof FormAwareRepositoryInterface) { throw new \UnexpectedValueException('You must use a Model implemented ' . FormAwareRepositoryInterface::class . ' in EditView'); } $data->form = $data->form ?: $this->model->getForm($this->formDefinition, $this->formControl, $this->formLoadData); }
/** * setTitle * * @param string $title * * @return static */ public function setTitle($title = null) { return parent::setTitle($title); }