Beispiel #1
0
 public function __construct(Post $entity)
 {
     $this->name = $entity->getName();
     $this->image = $entity->getImage();
     $this->intro = $entity->getIntro();
     $this->content = $entity->getContent();
     $this->status = $entity->getStatus();
     $this->tags = $entity->getTags();
 }
Beispiel #2
0
 /**
  * Set post
  *
  * @param  \Desarrolla2\Bundle\BlogBundle\Entity\Post $post
  * @return PostHistory
  */
 public function setPost(\Desarrolla2\Bundle\BlogBundle\Entity\Post $post = null)
 {
     $this->post = $post;
     $this->setName($post->getName());
     $this->setIntro($post->getIntro());
     $this->setContent($post->getContent());
     return $this;
 }