예제 #1
0
 /**
  * {@inheritdoc}
  */
 public function getForm($resource, array $config = [])
 {
     $builder = $this->getFormBuilder();
     $defaultConfig = ['name' => $this->repository->getAlias(), 'validation_groups' => ['Default']];
     $config = array_merge($defaultConfig, $config);
     return $builder->createForm($config, $resource);
 }
 protected function findByRequestParameter(Request $request)
 {
     return $this->repository->find((int) $request->attributes->get($this->requestAttributeName));
 }