original_string: public function buildView(FormView $view, FormInterface $form, array $options)
      {
          $view->vars['translation'] = isset($options['translation']) && $options['translation'] === true;
          $view->vars['currentLocale'] = $this->defaultLocale;
          if($view->vars['translation']) {
              $parent = $form->getParent();
              if($parent instanceof Form) {
                  $property = new Property($form->getPropertyPath());
                  $entity = $parent->getConfig()->getDataClass();
                  if(is_object($parent->getData())) {
                      $entity = $parent->getData();
                  }
  
                  $translations = $this->translator->getTranslationData($entity, $property);
                  if($translations === null) {
                      $view->vars['translation'] = false;
                      return;
                  }
                  $view->vars['translations'] = $translations;
              }
          }
      }
code: public function buildView(FormView $view, FormInterface $form, array $options)
      {
          $view->vars['translation'] = isset($options['translation']) && $options['translation'] === true;
          $view->vars['currentLocale'] = $this->defaultLocale;
          if($view->vars['translation']) {
              $parent = $form->getParent();
              if($parent instanceof Form) {
                  $property = new Property($form->getPropertyPath());
                  $entity = $parent->getConfig()->getDataClass();
                  if(is_object($parent->getData())) {
                      $entity = $parent->getData();
                  }
  
                  $translations = $this->translator->getTranslationData($entity, $property);
                  if($translations === null) {
                      $view->vars['translation'] = false;
                      return;
                  }
                  $view->vars['translations'] = $translations;
              }
          }
      }
code_tokens: public function buildView ( FormView $ view , FormInterface $ form , array $ options ) { $ view -> vars [ 'translation' ] = isset ( $ options [ 'translation' ] ) && $ options [ 'translation' ] === true ; $ view -> vars [ 'currentLocale' ] = $ this -> defaultLocale ; if ( $ view -> vars [ 'translation' ] ) { $ parent = $ form -> getParent ( ) ; if ( $ parent instanceof Form ) { $ property = new Property ( $ form -> getPropertyPath ( ) ) ; $ entity = $ parent -> getConfig ( ) -> getDataClass ( ) ; if ( is_object ( $ parent -> getData ( ) ) ) { $ entity = $ parent -> getData ( ) ; } $ translations = $ this -> translator -> getTranslationData ( $ entity , $ property ) ; if ( $ translations === null ) { $ view -> vars [ 'translation' ] = false ; return ; } $ view -> vars [ 'translations' ] = $ translations ; } } }
docstring: Pass the image URL to the view
  
  @param FormView $view
  @param FormInterface $form
  @param array $options
docstring_tokens: Pass the image URL to the view