Form/Type/UploadType.php
public function buildView(FormView $view, FormInterface $form, array $options)
    {
        $view->vars['multiple'] = $options['multiple'];
        $view->vars['allowed_filetypes'] = $options['allowed_filetypes'];

        $mediaEntity = $this->manager->getRepository('MMMediaBundle:Media')->find((int) $view->vars['value']);
        $view->vars['value_media_json'] = $this->getJsonFormatedMedia($mediaEntity);
        // TODO: implement MediaType Configuration
    }
public function buildView(FormView $view, FormInterface $form, array $options)
    {
        $view->vars['multiple'] = $options['multiple'];
        $view->vars['allowed_filetypes'] = $options['allowed_filetypes'];

        $mediaEntity = $this->manager->getRepository('MMMediaBundle:Media')->find((int) $view->vars['value']);
        $view->vars['value_media_json'] = $this->getJsonFormatedMedia($mediaEntity);
        // TODO: implement MediaType Configuration
    }
{@inheritdoc}