コード例 #1
0
 /**
  * Display the form content.
  *
  * @return string
  */
 function __toString()
 {
     $content = $this->object->getContent();
     if ($content instanceof View) {
         return $content->render();
     }
     return '';
 }
コード例 #2
0
 /**
  * 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;
 }
コード例 #4
0
 /**
  * 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);
     }
 }