AvailabilityNotificationRepository
class AvailabilityNotificationRepository extends EntityRepository
Class AvailabilityNotificationRepository is injected as empire_changed_price_plugin.availability_notifications_repository service. AvailabilityNotificationRepository is used for crud operation for entity.
Use this class to work with database.
Traits
Constants
| ALIAS |
Alias for entity |
| USER_ALIAS |
Alias for user entity |
| PRODUCT_ALIAS |
Alias for product entity |
| ATTR_VAL_ALIAS |
Alias for product attribute value entity |
| VAL_ALIAS |
Alias for attribute value entity |
| SIMPLE_PRODUCT_ALIAS |
Alias for simple product entity |
Methods
Should contain group by which jqgrid uses.
JQGrid function
JQGrid function
Find all products that provided user is watching
Find all products that provided user is watching for frontend
Update existing Availability notification
Persist new Availability notification
Remove Availability notification for provided user
Remove Availability notification that match provided ids
Remove Availability notification that match provided ids
Set should inform user to TRUE for all availability notifications that match provided ids
Find all availability notifications that should send notification to user
This is custom count query because we need to count [USER/PRODUCT].id instead of self::ALIAS.id This is only used here, every other query should just count self::ALIAS.id
Remove availability notification for provided product and user
Find single availability notification for provided combination of order, product and user
Remove availability notification for provide order(user and product)
Find all availability notifications for provided user
Find availability notification for provided id
Find all availability notifications that should send notification to provided user
No description
Details
in JQGridTrait at line 27
jQGridJoinFields(QueryBuilder $qb, JQGridWrapper $jqGridWrapper)
All joins used in select.
Override in the repository class if needed. Should do nothing otherwise
in JQGridTrait at line 42
jQGridGroupByFields(QueryBuilder $qb, JQGridWrapper $jqGridWrapper)
Should contain group by which jqgrid uses.
Override in the repository class if needed. Should do nothing otherwise
in JQGridTrait at line 61
array
findAllForJQGRID(int $page, int $offset, array $sortParams, array $additionalParams, JQGridWrapper $jqGridWrapper)
JQGrid function
in JQGridTrait at line 94
array
searchForJQGRID(array $searchParams, array $sortParams, bool $isCountSearch = false, array $additionalParams = array(), JQGridWrapper $jqGridWrapper = null)
JQGrid function
at line 78
array
getAvailabilityListForUserBackend(int $userId)
Find all products that provided user is watching
at line 114
array
getAvailabilityListForUser(int $userId)
Find all products that provided user is watching for frontend
at line 157
AvailabilityNotification
editAvailabilityNotification(AvailabilityNotification $availabilityNotification)
Update existing Availability notification
at line 176
AvailabilityNotification
addProductAvailabilityNotification(AvailabilityNotification $availabilityNotification)
Persist new Availability notification
at line 197
bool
removeFromAvailabilityNotification(int $userId, int $productId, int $attrValId)
Remove Availability notification for provided user
at line 230
deleteAvailabilityNotificationById(array $idsArray)
Remove Availability notification that match provided ids
at line 250
bool
removeAvailabilityNotificationsById(array $ids)
Remove Availability notification that match provided ids
at line 271
bool
setAvailabilityNotificationsToInformUser(array $idsArray)
Set should inform user to TRUE for all availability notifications that match provided ids
at line 293
array
getAllAvailabilityNotifications()
Find all availability notifications that should send notification to user
at line 325
mixed
getCountForJQGRIDCustom(array|null $searchParams, array|null $sortParams, true $isCountSearch, array|null $additionalParams, JQGridWrapper|null $jqGridWrapper)
This is custom count query because we need to count [USER/PRODUCT].id instead of self::ALIAS.id This is only used here, every other query should just count self::ALIAS.id
at line 365
bool
removeProductFromAvailabilityList(int $userId, int $productId, int $attrValId)
Remove availability notification for provided product and user
at line 403
mixed|null
findUnavailableProductQuantityInOrder(int $userId, int $productId, int|null $attrValId, int $orderId)
Find single availability notification for provided combination of order, product and user
at line 434
array
findAvailabilityItemsForOrder(Order $order)
Find all availability notifications for provided order
at line 453
bool
clearUnavailableQuantitiesForOrder(Order $order, int|null $userId = null, int|null $productId = null, int|null $attrValId = null)
Remove availability notification for provide order(user and product)
at line 488
array
getAllAvailabilityNotificationForLoggedUser(User $user)
Find all availability notifications for provided user
at line 508
bool
removeAvailabilityNotificationById(int $notificationId)
Find availability notification for provided id
at line 528
array
getCurrentlyAvailableNotificationsForUser(User $user)
Find all availability notifications that should send notification to provided user