/** * Return the form to edit an existing disk. * * @param DiskFormBuilder $disk * @param AdapterFormBuilder $form * @param DiskRepositoryInterface $disks * @param ConfigurationFormBuilder $configuration * @param $id * @return \Symfony\Component\HttpFoundation\Response */ public function edit(DiskFormBuilder $disk, AdapterFormBuilder $form, DiskRepositoryInterface $disks, ConfigurationFormBuilder $configuration, $id) { $entry = $disks->find($id); $adapter = $entry->getAdapter(); $form->addForm('disk', $disk->setEntry($id)->setAdapter($adapter)); $form->addForm('configuration', $configuration->setEntry($adapter->getNamespace())->setScope($entry->getSlug())); return $form->render(); }