/** * Edit an existing assignment. * * @param AssignmentFormBuilder $builder * @param TypeRepositoryInterface $types * @param $type * @param $id * @return \Symfony\Component\HttpFoundation\Response */ public function edit(AssignmentFormBuilder $builder, TypeRepositoryInterface $types, $type, $id) { /* @var TypeInterface $type */ $type = $types->find($type); return $builder->setStream($type->getEntryStream())->render($id); }
public function assign(AssignmentFormBuilder $form, TypeRepositoryInterface $types, StreamRepositoryInterface $streams, FieldRepositoryInterface $fields, $id, $field) { $type = $types->find($id); return $form->setStream($type->getEntryStream())->setField($fields->find($field))->render(); }