Example #1
0
 /**
  *
  * @access public
  * @param  \Map2u\ForumBundle\Entity\Post              $post
  * @return \Map2u\ForumBundle\Manager\ManagerInterface
  */
 public function lock(Post $post)
 {
     $post->setUnlockedUntilDate(new \Datetime('now'));
     $this->persist($post)->flush();
     $this->refresh($post);
     return $this;
 }
Example #2
0
 /**
  *
  * @access public
  * @param \Map2u\ForumBundle\Entity\Post $post
  */
 public function setLockLimitOnPost(Post $post)
 {
     $post->setUnlockedUntilDate(new \Datetime('now + ' . $this->afterDays . ' days'));
 }