ProductStockSubscriber
-
#[AsDoctrineListener]
-
$event: \Doctrine\ORM\Events::postUpdate
-
#[AsDoctrineListener]
-
$event: \Doctrine\ORM\Events::postPersist
Table of Contents
Properties
-
$logger
: LoggerInterface
-
$mailerService
: MailerService
-
$smsService
: SmsService
Methods
-
__construct()
: mixed
-
postPersist()
: void
-
postUpdate()
: void
-
checkThresholds()
: void
-
sendAlerts()
: void
$logger
read-only
private
LoggerInterface
$logger
$mailerService
read-only
private
MailerService
$mailerService
$smsService
read-only
private
SmsService
$smsService
__construct()
public
__construct(MailerService $mailerService, SmsService $smsService, LoggerInterface $logger) : mixed
Parameters
-
$mailerService
: MailerService
-
-
$smsService
: SmsService
-
-
$logger
: LoggerInterface
-
postPersist()
public
postPersist(PostPersistEventArgs $args) : void
Parameters
-
$args
: PostPersistEventArgs
-
postUpdate()
public
postUpdate(PostUpdateEventArgs $args) : void
Parameters
-
$args
: PostUpdateEventArgs
-
checkThresholds()
private
checkThresholds(Product $entity, EntityManagerInterface $em) : void
Parameters
-
$entity
: Product
-
-
$em
: EntityManagerInterface
-
sendAlerts()
private
sendAlerts(object $entity, string $type, EntityManagerInterface $em[, int|null $threshold = null ]) : void
Parameters
-
$entity
: object
-
-
$type
: string
-
-
$em
: EntityManagerInterface
-
-
$threshold
: int|null
= null
-