original_string: private function retrieveFormFieldDescription(AdminInterface $admin, $field)
      {
          $admin->getFormFieldDescriptions();
  
          $fieldDescription = $admin->getFormFieldDescription($field);
  
          if (!$fieldDescription) {
              throw new \RuntimeException(sprintf('The field "%s" does not exist.', $field));
          }
  
          if (null === $fieldDescription->getTargetEntity()) {
              throw new \RuntimeException(sprintf('No associated entity with field "%s".', $field));
          }
  
          return $fieldDescription;
      }
code: private function retrieveFormFieldDescription(AdminInterface $admin, $field)
      {
          $admin->getFormFieldDescriptions();
  
          $fieldDescription = $admin->getFormFieldDescription($field);
  
          if (!$fieldDescription) {
              throw new \RuntimeException(sprintf('The field "%s" does not exist.', $field));
          }
  
          if (null === $fieldDescription->getTargetEntity()) {
              throw new \RuntimeException(sprintf('No associated entity with field "%s".', $field));
          }
  
          return $fieldDescription;
      }
code_tokens: private function retrieveFormFieldDescription ( AdminInterface $ admin , $ field ) { $ admin -> getFormFieldDescriptions ( ) ; $ fieldDescription = $ admin -> getFormFieldDescription ( $ field ) ; if ( ! $ fieldDescription ) { throw new \ RuntimeException ( sprintf ( 'The field "%s" does not exist.' , $ field ) ) ; } if ( null === $ fieldDescription -> getTargetEntity ( ) ) { throw new \ RuntimeException ( sprintf ( 'No associated entity with field "%s".' , $ field ) ) ; } return $ fieldDescription ; }
docstring: Retrieve the form field description given by field name.
  Copied from Sonata\AdminBundle\Controller\HelperController.
  
  @param AdminInterface $admin
  @param string         $field
  
  @return FormInterface
  
  @throws \RuntimeException
docstring_tokens: Retrieve the form field description given by field name . Copied from Sonata \ AdminBundle \ Controller \ HelperController .