예제 #1
0
 /**
  * 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);
 }
예제 #2
0
 /**
  * setTitle
  *
  * @param string $title
  *
  * @return  static
  */
 public function setTitle($title = null)
 {
     return parent::setTitle($title);
 }