/** * Return a form to edit the variables. * * @param StreamRepositoryInterface $streams * @param VariableFormBuilder $form * @param $id * @return \Symfony\Component\HttpFoundation\Response */ public function edit(StreamRepositoryInterface $streams, VariableFormBuilder $form, $id) { /* @var StreamInterface $group */ $group = $streams->find($id); $entry = $group->getEntryModel()->firstOrNew([]); return $form->setModel($group->getEntryModelName())->render($entry); }
/** * Handle the command. * * @param StreamSchema $schema */ public function handle(StreamSchema $schema, StreamRepositoryInterface $streams) { /* @var StreamInterface $stream */ $stream = $streams->find($this->stream->getId()); $schema->renameTable($stream, $this->stream); if ($stream->isTranslatable()) { $schema->renameTranslationsTable($stream, $this->stream); } }