SystemAlertService
in package
Class SystemAlertService
Table of Contents
Properties
- $container : ContainerInterface
- $entityManager : EntityManagerInterface
- $systemAlertRepository : SystemAlertRepository
- $filesImportService : FilesImportService|null
- $header : mixed
- $logService : LogServiceInterface
- $router : RouterInterface
Methods
- __construct() : mixed
- QueueService constructor.
- add() : SystemAlert
- Adding new error Message
- export() : void
- Exporting Files
- getDashboardStats() : array<string|int, mixed>
- getRepo() : SystemAlertRepository
- notify() : mixed
- Notifying about new System Alert
- save() : SystemAlert
- Save a SaleLog
- setEntityManager() : mixed
- exportCsv() : mixed
- Exporting as csv
- exportXls() : mixed
- Exporting as Xls
Properties
$container
protected
ContainerInterface
$container
$entityManager
protected
EntityManagerInterface
$entityManager
$systemAlertRepository
protected
SystemAlertRepository
$systemAlertRepository
$filesImportService
private
FilesImportService|null
$filesImportService
$header
private
mixed
$header
= ['id' => 'id', 'increment_id' => 'Incr.ID', 'supplier_invoice_number' => 'N°Facture', 'supplier_invoice_date' => 'Date facture', 'status' => 'status', 'invoicedAmount' => 'Facturé', 'insteadOf' => 'Au lieu']
$logService
private
LogServiceInterface
$logService
$router
private
RouterInterface
$router
Methods
__construct()
QueueService constructor.
public
__construct(ContainerInterface $container, EntityManagerInterface $entityManager, RouterInterface $router, LogServiceInterface $logService[, FilesImportService $filesImportService = null ]) : mixed
Parameters
- $container : ContainerInterface
- $entityManager : EntityManagerInterface
- $router : RouterInterface
- $logService : LogServiceInterface
- $filesImportService : FilesImportService = null
add()
Adding new error Message
public
add(string|null $model[, string|null $message = null ][, string|null $trace = null ][, array<string|int, mixed>|null $info = [] ][, string $level = 'info' ][, int $errorLevel = null ][, mixed $createdAt = null ][, mixed $saleProduct = null ][, mixed $tag = null ]) : SystemAlert
Parameters
- $model : string|null
-
see \CoreBundle\Services\SystemAlert folder
- $message : string|null = null
-
example "Error happens while import sale {#} Exception message here example undefined index 11" we need the {#} separation for emails
- $trace : string|null = null
-
example "exception getTraceAsString()"
- $info : array<string|int, mixed>|null = []
-
example ['OrderId' => 1, 'IncrementId' => 254132, 'customKey' => 'customKeyValue']
- $level : string = 'info'
-
example "critical"
- $errorLevel : int = null
- $createdAt : mixed = null
- $saleProduct : mixed = null
- $tag : mixed = null
Return values
SystemAlertexport()
Exporting Files
public
export(mixed $title, mixed $data, mixed $columns, mixed $format[, array<string|int, mixed> $customHeader = [] ]) : void
Parameters
- $title : mixed
- $data : mixed
- $columns : mixed
- $format : mixed
- $customHeader : array<string|int, mixed> = []
getDashboardStats()
public
getDashboardStats() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getRepo()
public
getRepo() : SystemAlertRepository
Return values
SystemAlertRepositorynotify()
Notifying about new System Alert
public
notify(SystemAlert $systemAlert) : mixed
Parameters
- $systemAlert : SystemAlert
save()
Save a SaleLog
public
save(SystemAlert $systemAlert) : SystemAlert
Parameters
- $systemAlert : SystemAlert
Return values
SystemAlertsetEntityManager()
public
setEntityManager(mixed $entityManager) : mixed
Parameters
- $entityManager : mixed
exportCsv()
Exporting as csv
private
exportCsv(mixed $data, mixed $columns, mixed $title) : mixed
Parameters
- $data : mixed
- $columns : mixed
- $title : mixed
exportXls()
Exporting as Xls
private
exportXls(mixed $data, mixed $columns, mixed $title) : mixed
Parameters
- $data : mixed
- $columns : mixed
- $title : mixed