2017 © Pedro Peláez
 

symfony-bundle messages

Bundle for easy integrations messages logic

image

youshido/messages

Bundle for easy integrations messages logic

  • Tuesday, July 28, 2015
  • by portey
  • Repository
  • 3 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Youshido Messages Bundle

``` php $user = $this->get('doctrine')->getRepository('AppBundle:User') ->find(1);, (*1)

$user2 = $this->get('doctrine')->getRepository('AppBundle:User') ->find(2);, (*2)

$user3 = $this->get('doctrine')->getRepository('AppBundle:User') ->find(3);, (*3)

$conversations = $this->get('messages')->getConversations($user); $newMessages = $this->get('messages')->countUnreadMessages($user);, (*4)

$conversation = $this->get('doctrine') ->getRepository('YMessagesBundle:Conversation') ->find(1);, (*5)

//only get messages $messages = $this->get('messages')->getMessages($conversation->getId()); //get messages and set it to read for user $messages = $this->get('messages')->getMessages($conversation->getId(), $user);, (*6)

//sending new message $this->get('messages')->sendMessage($conversation->getId(), $user, 'hello !');, (*7)

$this->get('messages')->joinConversation($conversation->getId(), $user2); $this->get('messages')->leaveConversation($conversation->getId(), $user2);, (*8)

$members = $this->get('messages')->getMembers($conversation->getId());, (*9)

$conversation = $this->get('messages')->findOrCreateConversation($user2, $user3);, (*10)

$is = $this->get('messages')->isConversationBetween($user, $user2); ```, (*11)

The Versions

28/07 2015

dev-master

9999999-dev https://github.com/Youshido/Messages

Bundle for easy integrations messages logic

  Sources   Download

MIT

The Requires

 

by Alexandr Viniychuk
by Portey Vasil

bundle symfony messages