Skip to content

Latest commit

 

History

History
executable file
·
81 lines (50 loc) · 1.72 KB

further.rst

File metadata and controls

executable file
·
81 lines (50 loc) · 1.72 KB

MgiletNotificationBundle

A simple Symfony 2/3/4 bundle for user notifications

Override the Notification entity

To override the notification entity (eg to add fields), you just have to create a new entity like this :

<?php

namespace App\Entity;

use Doctrine\ORM\Mapping as ORM;
use Mgilet\NotificationBundle\Entity\NotificationInterface;
use Mgilet\NotificationBundle\Model\Notification as NotificationModel;

/**
 * Class Notification
 * @ORM\Entity
 *
 * @package Acme\Entity
 */
class Notification extends NotificationModel implements NotificationInterface
{
}

Next, the only other step is to configure the bundle to use your new entity :

config/packages/mgilet_notification.yaml

mgilet_notification:
        notification_class: App\Entity\MyCustomNotification

Go further

If you like my bundle and/or want to :

  • Suggest something
  • Report a problem
  • Improve something
  • Add translation(s)

Just go to the project's Github. :)

Most important thing : if you like it share it !

Thanks

A huge thanks to the Symfony community and all amazing free piece of software.

And thank you for using this.