Depends on BriareosNodejsBundle.
-
Your user class must implement
Briareos\ChatBundle\Entity\ChatSubjectInterface
-
Map the implemented interface to your user class.
# app/config/config.yml doctrine: orm: resolve_target_entities Briareos\NodejsBundle\Entity\NodejsSubjectInterface: App\UserBundle\Entity\User
-
Register the
FIND_IN_SET
MySQL function.# app/config/config.yml dql: string_functions: FindInSet: DoctrineExtensions\Query\Mysql\FindInSet
-
Update your schema.
$ php app/console doctrine:schema:update --force
-
On the pages you want to use the chat include
BriareosChatBundle:Chat:chat.html.twig
or write your own template and/or implementation. This must be done after the inclusion ofbundles/briareosnodejs/js/nodejs.js
from the BriareosNodejsBundle.