public function sendUserFollowRequest(UserFollow $follow) { $socialActivity = (new SocialActivity(SocialActivity::TYPE_FOLLOW_REQUEST, $follow->getFollower()))->setTarget(['id' => $follow->getId(), 'type' => 'user'])->setRecipient($follow->getUser()); $this->em->persist($socialActivity); $this->em->flush($socialActivity); $this->pt->addToQueue('sendInfluencePush', array($follow->getUser()->getId(), $follow->getFollower()->getId())); return $socialActivity; }
public function getId() { if ($this->__isInitialized__ === false) { return (int) $this->_identifier["id"]; } $this->__load(); return parent::getId(); }