/** * 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')); }
/** * 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); }
/** * 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); } }