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