File tree Expand file tree Collapse file tree 5 files changed +9
-209
lines changed
src/Event/EventBundle/Entity Expand file tree Collapse file tree 5 files changed +9
-209
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,6 @@ public function registerBundles()
1717 new Doctrine \Bundle \DoctrineBundle \DoctrineBundle (),
1818 new Sensio \Bundle \FrameworkExtraBundle \SensioFrameworkExtraBundle (),
1919 new Knp \Bundle \MenuBundle \KnpMenuBundle (),
20- new Stof \DoctrineExtensionsBundle \StofDoctrineExtensionsBundle (),
2120 new FOS \JsRoutingBundle \FOSJsRoutingBundle (),
2221
2322 new Event \EventBundle \EventEventBundle (),
Original file line number Diff line number Diff line change @@ -56,12 +56,6 @@ doctrine:
5656 auto_generate_proxy_classes : %kernel.debug%
5757 auto_mapping : true
5858
59- stof_doctrine_extensions :
60- default_locale : " %locale%"
61- orm :
62- default :
63- timestampable : true
64-
6559# Swiftmailer Configuration
6660swiftmailer :
6761 transport : %mailer_transport%
Original file line number Diff line number Diff line change 2626 "doctrine/common" : " ^2.6" ,
2727 "doctrine/orm" : " ^2.5" ,
2828 "doctrine/doctrine-bundle" : " ^1.6" ,
29- "stof/doctrine-extensions-bundle" : " dev-master" ,
3029 "friendsofsymfony/jsrouting-bundle" : " ^1.6"
3130 },
3231 "require-dev" : {
Original file line number Diff line number Diff line change 33namespace Event \EventBundle \Entity ;
44
55use Doctrine \ORM \Mapping as ORM ;
6- use Gedmo \Mapping \Annotation as Gedmo ;
76
87/**
98 * CallForPaper
109 *
1110 * @ORM\Table(name="ev_call_for_paper")
1211 * @ORM\Entity(repositoryClass="Event\EventBundle\Entity\Repository\CallForPaperRepository")
12+ * @ORM\HasLifecycleCallbacks()
1313 */
1414class CallForPaper
1515{
@@ -105,19 +105,10 @@ class CallForPaper
105105 /**
106106 * @var \DateTime $created
107107 *
108- * @Gedmo\Timestampable(on="create")
109108 * @ORM\Column(type="datetime")
110109 */
111110 private $ created ;
112111
113- /**
114- * @var \DateTime $updated
115- *
116- * @Gedmo\Timestampable(on="update")
117- * @ORM\Column(type="datetime")
118- */
119- private $ updated ;
120-
121112 /**
122113 * @var Event
123114 *
@@ -353,23 +344,21 @@ public function getNote()
353344 }
354345
355346 /**
356- * Get created
357- *
358- * @return \DateTime
347+ * @ORM\PrePersist
359348 */
360- public function getCreated ()
349+ public function setCreatedAtValue ()
361350 {
362- return $ this ->created ;
351+ $ this ->created = new \ DateTime () ;
363352 }
364353
365354 /**
366- * Get updated
355+ * Get created
367356 *
368357 * @return \DateTime
369358 */
370- public function getUpdated ()
359+ public function getCreated ()
371360 {
372- return $ this ->updated ;
361+ return $ this ->created ;
373362 }
374363
375364 /**
You can’t perform that action at this time.
0 commit comments