2017 © Pedro Peláez
 

symfony-bundle message-bundle

Message bundle

image

braune-digital/message-bundle

Message bundle

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 6 % Grown

The README.md

BrauneDigitalMessageBundle

This Symfony2-Bundle provides a base for user to user and system messaging., (*1)

Requirements

In order to install this bundle you will need: * DoctrineORM (Entity Persistence) * SonataEasyExtends (optional but strongly recommended), (*2)

Installation

Just run composer:, (*3)

composer require braune-digital/message-bundle

And enable the Bundle in AppKernel.php:, (*4)

public function registerBundles()
    {
        $bundles = array(
          ...
          new BrauneDigital\MessageBundle\BrauneDigitalMessageBundle(),
          ...
        );

In order to use the bundle you have to, (*5)

Extend the Bundle

Just run:, (*6)

php app/console sonata:easy-extends:generate --dest=src BrauneDigitalMessageBundle

Enable the extended Bundle in AppKernel.php:, (*7)

public function registerBundles()
    {
        $bundles = array(
          ...
          new Application\BrauneDigital\MessageBundle\ApplicationBrauneDigitalMessageBundle(),
          ...
        );

Add the relations to your User-Entity

<one-to-many target-entity="Application\BrauneDigital\MessageBundle\Entity\UserHasConversation" field="conversations" mapped-by="user">
            <cascade><cascade-remove /></cascade>
            <order-by>
                <order-by-field name="joinedOn" direction="DESC"/>
            </order-by>
        </one-to-many>

        <one-to-many target-entity="Application\BrauneDigital\MessageBundle\Entity\UserHasMessage" field="messages" mapped-by="user">
            <cascade><cascade-remove /></cascade>
            <order-by>
                <order-by-field name="date" direction="ASC"/>
            </order-by>
        </one-to-many>

        <one-to-many target-entity="Application\BrauneDigital\MessageBundle\Entity\Message" field="sentMessages" mapped-by="by">
            <order-by>
                <order-by-field name="date" direction="ASC"/>
            </order-by>
        </one-to-many>

Todo

  • Add Document Version
  • Validation / Constraints
  • Security (Voters)

The Versions

18/04 2017

dev-master

9999999-dev

Message bundle

  Sources   Download

MIT

by Patrick Rathje
by Henrik Braune

message chat conversation bundle

18/04 2017

1.0.x-dev

1.0.9999999.9999999-dev

Message bundle

  Sources   Download

MIT

by Patrick Rathje
by Henrik Braune

message chat conversation bundle

18/04 2017

v1.0.0

1.0.0.0

Message bundle

  Sources   Download

MIT

by Patrick Rathje
by Henrik Braune

message chat conversation bundle