softspring / notification-bundle
User notifications bundle
Installs: 5 608
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=8.1
- doctrine/doctrine-bundle: ^2.5
- doctrine/orm: ^2.10 | ^3.0
- softspring/user-bundle: ^5.2
- symfony/console: ^5.4|^6.0|^7.0
- symfony/form: ^5.4|^6.0|^7.0
- symfony/framework-bundle: ^5.4|^6.0|^7.0
- symfony/security-bundle: ^5.4|^6.0|^7.0
- symfony/translation: ^5.4|^6.0|^7.0
Requires (Dev)
- friendsofphp/php-cs-fixer: 3.64.*
- phpstan/phpstan: ^1.10
- rector/rector: ^1.0
- 5.4.x-dev
- 5.3.x-dev
- v5.3.4
- v5.3.3
- v5.3.2
- v5.3.1
- v5.3.0
- v5.3.0-rc9
- v5.3.0-rc8
- v5.3.0-rc7
- v5.3.0-rc6
- v5.3.0-rc5
- v5.3.0-rc4
- v5.3.0-rc3
- v5.3.0-rc2
- v5.3.0-rc1
- v5.3.0-beta4
- v5.3.0-beta3
- v5.3.0-beta2
- v5.3.0-beta1
- v5.3.0-alpha21
- 5.2.x-dev
- v5.2.7
- v5.2.6
- v5.2.5
- v5.2.4
- v5.2.3
- v5.2.2
- v5.2.1
- v5.2.0
- v5.2.0-rc10
- v5.2.0-rc9
- v5.2.0-rc8
- v5.2.0-rc7
- v5.2.0-rc6
- v5.2.0-rc5
- v5.2.0-rc4
- v5.2.0-rc1
- 5.1.x-dev
- v5.1.25
- v5.1.24
- v5.1.23
- v5.1.22
- v5.1.21
- v5.1.20
- v5.1.19
- v5.1.18
- v5.1.17
- v5.1.16
- v5.1.15
- v5.1.14
- v5.1.13
- v5.1.12
- v5.1.11
- v5.1.10
- v5.1.9
- v5.1.8
- v5.1.7
- v5.1.6
- v5.1.5
- v5.1.2
- v5.1.1
- v5.1.0
- v5.0.6
- v5.0.5
- v5.0.4
- v5.0.3
- v5.0.2
- v5.0.1
- v5.0.0
- v5.0.0-rc1
- v5.0.0-beta1
- 4.1.0
- 4.0.0
This package is auto-updated.
Last update: 2024-11-21 13:41:36 UTC
README
Installation
Configure Bundle
If you use flex, you should not need to do this. But if you don't or something goes wrong, you must add include the bundle in config/bundles.php file:
<?php
return [
...
Softspring\NotificationBundle\SfsNotificationBundle::class => ['all' => true],
];
Configure ORM
Create your Notification entity:
<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Softspring\Component\DoctrineTemplates\Entity\Traits\AutoId;
use Softspring\NotificationBundle\Model\Notification as SfsNotification;
/**
* @ORM\Entity()
* @ORM\Table(name="notification")
*/
class Notification extends SfsNotification
{
use AutoId;
/**
* @var User|null
* @ORM\ManyToOne(targetEntity="App\Entity\User", inversedBy="notifications")
* @ORM\JoinColumn(name="user_id", referencedColumnName="id", onDelete="CASCADE")
*/
protected $user;
/**
* @inheritdoc
*/
public function getUser(): ?UserInterface
{
return $this->user;
}
/**
* @inheritdoc
*/
public function setUser(UserInterface $user): void
{
$this->user = $user;
}
}
Create config/packages/sfs_notification.yaml file with your entity configuration
sfs_notification:
notification_class: App\Entity\Notification