src/Cmsable/Resource/Distributor.php
protected function makeForm($resource, $class, $model)
    {
        $form = $this->container->make($class);

        if (!$this->formRules($form) && $rules = $this->rules($resource)) {
            $form->getValidator()->setRules($rules);
        }

        if ($model) {
            $form->setModel($model);
        }

        $this->publish($resource, 'form.created', [$form]);

        return $form;
    }
protected function makeForm($resource, $class, $model)
    {
        $form = $this->container->make($class);

        if (!$this->formRules($form) && $rules = $this->rules($resource)) {
            $form->getValidator()->setRules($rules);
        }

        if ($model) {
            $form->setModel($model);
        }

        $this->publish($resource, 'form.created', [$form]);

        return $form;
    }
protected function makeForm ( $ resource , $ class , $ model ) { $ form = $ this -> container -> make ( $ class ) ; if ( ! $ this -> formRules ( $ form ) && $ rules = $ this -> rules ( $ resource ) ) { $ form -> getValidator ( ) -> setRules ( $ rules ) ; } if ( $ model ) { $ form -> setModel ( $ model ) ; } $ this -> publish ( $ resource , 'form.created' , [ $ form ] ) ; return $ form ; }
Creates the form and fires an event

@param string $resource
@param string $class
@param mixed $model
@return \FormObject\Form
Creates the form and fires an event