/** * {@inheritDoc} */ public function buildView(FormView $view, FormInterface $form, array $options) { $fileHistory = null; $fileHistoryUrl = null; if ($form->getData() !== null) { $fileHistory = $this->fileHistoryManager->findOneByFileName($form->getData()); $fileHistoryUrl = $this->fileHistoryManager->getUrl($fileHistory, $options['resolver_key']); } $className = 'jb_result_filename'; if (isset($view->vars['attr']['class'])) { $view->vars['attr']['class'] .= ' ' . $className; } else { $view->vars['attr']['class'] = $className; } $view->vars['file_history'] = $fileHistory; $view->vars['file_history_url'] = $fileHistoryUrl; $view->vars['endpoint'] = $options['endpoint']; $view->vars['download_link'] = $options['download_link']; $view->vars['remove_link'] = $options['remove_link']; $view->vars['loading_file'] = $options['loading_file']; $view->vars['use_crop'] = false; }