brandcodenl / symfony-notification-bundle
A simple notification bundle
Installs: 531
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- doctrine/orm: ^2.5
- symfony/symfony: ^3.4|^4.0
This package is auto-updated.
Last update: 2025-06-15 14:03:02 UTC
README
This bundle offers some default resources for managing and displaying (user bound) facebook like notifications on your website.
Configure the bundle
- Create your own notification entity and extend the notification entity in this bundle.
<?php namespace AppBundle\Entity; use Doctrine\ORM\Mapping as ORM; use BrandcodeNL\SymfonyNotificationBundle\Entity\Notification as BaseNotification; class Notification extends BaseNotification { }
To link the notifications to your own User entity, implement the BrandcodeNL\SymfonyNotificationBundle\Model\UserInterface in your Entity. After add the following config following lines to your config.yml/doctrine.yml file.
doctrine: orm: resolve_target_entities: BrandcodeNL\SymfonyNotificationBundle\Model\UserInterface: Path\To\Your\Entity
There are some default routes included within this bundle for setting notifications to the status 'read', to use these you will have to include these routes in the routes.yml file.
brandcodenl_symfony_notification_bundle_routing: resource: "@BrandcodeNLNotificationBundle/Controller" prefix: / type: annotation
If you wish to use any of the default views provided by this bundle you can include them in your views:
{% include '@BrandcodeNLNotification/NotificationContainer.html.twig' %}