Esempio n. 1
0
 public function setModel($model)
 {
     $this->requireServerValidation = is_object($model);
     if (!$this->requireServerValidation) {
         //Just a model name was passed.
         $model = new $model();
     }
     if (!is_subclass_of($model, "Elitexp\\AspNet\\Model")) {
         throw new \Exception("The Model should extend the AspNet Model for correct behavior.");
     }
     parent::setModel($model);
 }
Esempio n. 2
0
 /**
  * Set the model instance on the form builder.
  *
  * @param mixed $model
  * @return void 
  * @static 
  */
 public static function setModel($model)
 {
     \Illuminate\Html\FormBuilder::setModel($model);
 }