/** * @ORM\PrePersist() * @ORM\PreUpdate() * */ public function preSave() { if ($this->getCreatedAt() == null) { $this->createdAt = new \DateTime(); } if ($this->getSlug() == null) { $this->slug = Urlizer::urlize($this->getName()); } }
/** * @ORM\PrePersist() * @ORM\PreUpdate() * */ public function preSave() { if ($this->getSlug() == null) { $this->slug = Urlizer::urlize($this->getName()); } }