public function newAction($type) {
        $entity = new Media();
        $entity->setMediaType($type);
        $form = $this->createCreateForm($entity);

        return array(
            'entity' => $entity,
            'form' => $form->createView(),
        );
    }