예제 #1
0
 /**
  * Display the form content.
  *
  * @return string
  */
 function __toString()
 {
     $content = $this->object->getContent();
     if ($content instanceof View) {
         return $content->render();
     }
     return '';
 }
 /**
  * Handle the installer form.
  *
  * @param Form                         $form
  * @param StreamsDistributionInstaller $distributionInstaller
  */
 public function handle(Form $form, StreamsDistributionInstaller $distributionInstaller)
 {
     $distributionInstaller->install($_POST);
     $form->setResponse(redirect('installer/complete'));
 }
예제 #3
0
 /**
  * Set the form entry.
  *
  * @param $entry
  * @return $this
  */
 public function setFormEntry($entry)
 {
     $this->form->setEntry($entry);
     return $this;
 }
 /**
  * Create a new InstallerFormBuilder instance.
  *
  * @param Form $form
  */
 public function __construct(Form $form)
 {
     $this->dispatch(new SetFormOptions($form->getOptions()));
     parent::__construct($form);
 }
예제 #5
0
 /**
  * Merge fields into the form.
  *
  * @param Form $parent
  * @param Form $child
  */
 protected function mergeFields(Form $parent, Form $child)
 {
     foreach ($child->getFields() as $field) {
         $parent->addField($field);
     }
 }