Browse Source

correction bug insertion film

François 6 years ago
parent
commit
e34cf898e1

+ 0 - 31
src/AppBundle/Entity/MediaVideo.php

@@ -37,13 +37,6 @@ class MediaVideo
      */
     private $identif;
 
-    /**
-     * @var \DateTime
-     *
-     * @ORM\Column(name="date", type="datetime")
-     */
-    private $date;
-
     /**
      * @Assert\Regex(
      *     pattern="#^(http|https)://(www.youtube.com|www.dailymotion.com|vimeo.com)/#",
@@ -53,30 +46,6 @@ class MediaVideo
      */
     private $url;
 
-    /**
-     * Constructor
-     */
-    public function __construct()
-    {
-        $this->setDate(new \DateTime());
-    }
-
-    /**
-     * @return \DateTime
-     */
-    public function getDate()
-    {
-        return $this->date;
-    }
-
-    /**
-     * @param \DateTime $date
-     */
-    public function setDate($date)
-    {
-        $this->date = $date;
-    }
-
     /**
      * Get id
      *

+ 1 - 1
src/AppBundle/Form/FilmType.php

@@ -36,7 +36,7 @@ class FilmType extends AbstractType
                 'required'  => false
             ))
             ->add('mediaVideo', MediaVideoType::class,array(
-                //'required'  =>  false,
+                'required'  =>  false,
             ))
             ->add('genres', CollectionType::class, array(
                 'entry_type'    =>  GenreType::class,

+ 1 - 1
src/AppBundle/Form/MediaVideoType.php

@@ -16,7 +16,7 @@ class MediaVideoType extends AbstractType
     {
         $builder->add('url', TextType::class, array(
             'label' => 'Url de la vidéo',
-                'required'  =>false
+            'required'  =>false
         ));
     }/**
      * {@inheritdoc}