Created
July 27, 2012 12:19
-
-
Save bakura10/3187633 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Thread extends AbstractService | |
{ | |
/** | |
* @param ThreadEntity $thread | |
*/ | |
public function create(ThreadEntity $thread) | |
{ | |
// I'm in a module, it does not have idea of what the specific application needs... but in my application, I need to add // another specific participant... | |
$user = $this->getAuthenticationService()->getIdentity(); | |
$thread->addParticipant($user); | |
$this->getEntityManager()->persist($thread); | |
$this->getEntityManager()->flush(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment