|
Open Journal Systems
3.3.0
|
Public Member Functions | |
| _fromRow ($row) | |
| build ($contextId, $level, $type, $assocType, $assocId, $userId=null) | |
| deleteByAssoc ($assocType, $assocId, $userId=null, $type=null, $contextId=null) | |
| deleteById ($notificationId, $userId=null) | |
| deleteObject ($notification) | |
| getByAssoc ($assocType, $assocId, $userId=null, $type=null, $contextId=null) | |
| getById ($notificationId, $userId=null) | |
| getByUserId ($userId, $level=NOTIFICATION_LEVEL_NORMAL, $type=null, $contextId=null, $rangeInfo=null) | |
| getInsertId () | |
| getNotificationCount ($read=true, $userId, $contextId=null, $level=NOTIFICATION_LEVEL_NORMAL) | |
| insertObject ($notification) | |
| newDataObject () | |
| setDateRead ($notificationId, $dateRead) | |
| transferNotifications ($oldUserId, $newUserId) | |
Public Member Functions inherited from DAO | |
| __construct ($dataSource=null, $callHooks=true) | |
| concat () | |
| convertFromDB ($value, $type) | |
| convertToDB ($value, &$type) | |
| dateFromDB ($d) | |
| datetimeFromDB ($dt) | |
| datetimeToDB ($dt) | |
| dateToDB ($d) | |
| flushCache () | |
| formatDateToDB ($date, $defaultNumWeeks=null, $acceptPastDate=true) | |
| getAdditionalFieldNames () | |
| getAffectedRows () | |
| getDataObjectSettings ($tableName, $idFieldName, $idFieldValue, $dataObject) | |
| getDataSource () | |
| getDirectionMapping ($direction) | |
| getDriver () | |
| getLocaleFieldNames () | |
| getType ($value) | |
| handleError ($dataSource, $sql) | |
| nullOrInt ($value) | |
| replace ($table, $arrFields, $keyCols) | |
| & | retrieve ($sql, $params=false, $callHooks=true) |
| & | retrieveCached ($sql, $params=false, $secsToCache=3600, $callHooks=true) |
| & | retrieveLimit ($sql, $params=false, $numRows=false, $offset=false, $callHooks=true) |
| & | retrieveRange ($sql, $params=false, $dbResultRange=null, $callHooks=true) |
| setCacheDir () | |
| setDataSource ($dataSource) | |
| update ($sql, $params=false, $callHooks=true, $dieOnError=true) | |
| updateDataObjectSettings ($tableName, $dataObject, $idArray) | |
Additional Inherited Members | |
Static Public Member Functions inherited from DAO | |
| static | getDataChangedEvent ($elementId=null, $parentElementId=null, $content='') |
Data Fields inherited from DAO | |
| $_dataSource | |
Protected Member Functions inherited from DAO | |
| _getInsertId ($table='', $id='') | |
Operations for retrieving and modifying Notification objects.
Definition at line 20 of file NotificationDAO.inc.php.
| NotificationDAO::_fromRow | ( | $row | ) |
Creates and returns an notification object from a row
| $row | array |
Definition at line 291 of file NotificationDAO.inc.php.
References HookRegistry\call(), DAO\datetimeFromDB(), and newDataObject().
Referenced by getById().
| NotificationDAO::build | ( | $contextId, | |
| $level, | |||
| $type, | |||
| $assocType, | |||
| $assocId, | |||
$userId = null |
|||
| ) |
Inserts or update a notification into notifications table.
| $level | int |
| $type | int |
| $assocType | int |
| $assocId | int |
| $userId | int (optional) |
| $contextId | int (optional) |
Definition at line 160 of file NotificationDAO.inc.php.
References insertObject(), newDataObject(), and DAO\update().
| NotificationDAO::deleteByAssoc | ( | $assocType, | |
| $assocId, | |||
$userId = null, |
|||
$type = null, |
|||
$contextId = null |
|||
| ) |
Delete notification(s) by association
| $assocType | int |
| $assocId | int |
| $userId | int optional |
| $type | int optional |
| $contextId | int optional |
Definition at line 235 of file NotificationDAO.inc.php.
References deleteObject(), and getByAssoc().
| NotificationDAO::deleteById | ( | $notificationId, | |
$userId = null |
|||
| ) |
Delete Notification by notification id
| $notificationId | int |
| $userId | int |
Definition at line 200 of file NotificationDAO.inc.php.
References DAO\getAffectedRows(), DAORegistry\getDAO(), and DAO\update().
Referenced by deleteObject().
| NotificationDAO::deleteObject | ( | $notification | ) |
Delete Notification
| $notification | Notification |
Definition at line 222 of file NotificationDAO.inc.php.
References deleteById().
Referenced by deleteByAssoc().
| NotificationDAO::getByAssoc | ( | $assocType, | |
| $assocId, | |||
$userId = null, |
|||
$type = null, |
|||
$contextId = null |
|||
| ) |
Retrieve Notifications by assoc. Note that this method will not return fully-fledged notification objects. Use NotificationManager::getNotificationsForUser() to get notifications with URL, and contents
| $assocType | int ASSOC_TYPE_... |
| $assocId | int |
| $userId | int User ID (optional) |
| $type | int |
| $contextId | int Context (journal/press/etc.) ID (optional) |
Definition at line 80 of file NotificationDAO.inc.php.
References DAO\retrieveRange().
Referenced by deleteByAssoc().
| NotificationDAO::getById | ( | $notificationId, | |
$userId = null |
|||
| ) |
Retrieve Notification by notification id
| $notificationId | int |
| $userId | int optional |
Definition at line 28 of file NotificationDAO.inc.php.
References _fromRow(), and DAO\retrieve().
| NotificationDAO::getByUserId | ( | $userId, | |
$level = NOTIFICATION_LEVEL_NORMAL, |
|||
$type = null, |
|||
$contextId = null, |
|||
$rangeInfo = null |
|||
| ) |
Retrieve Notifications by user id Note that this method will not return fully-fledged notification objects. Use NotificationManager::getNotificationsForUser() to get notifications with URL, and contents
| $userId | int |
| $level | int |
| $type | int |
| $contextId | int |
| $rangeInfo | Object |
Definition at line 56 of file NotificationDAO.inc.php.
References DAO\retrieveRange().
| NotificationDAO::getInsertId | ( | ) |
Get the ID of the last inserted notification
Definition at line 246 of file NotificationDAO.inc.php.
References DAO\_getInsertId().
Referenced by insertObject().
| NotificationDAO::getNotificationCount | ( | $read = true, |
|
| $userId, | |||
$contextId = null, |
|||
$level = NOTIFICATION_LEVEL_NORMAL |
|||
| ) |
Get the number of unread messages for a user
| $read | boolean Whether to check for read (true) or unread (false) notifications |
| $contextId | int |
| $userId | int |
| $level | int |
Definition at line 258 of file NotificationDAO.inc.php.
References DAO\retrieve().
| NotificationDAO::insertObject | ( | $notification | ) |
Inserts a new notification into notifications table
| $notification | object |
Definition at line 129 of file NotificationDAO.inc.php.
References DAO\datetimeToDB(), Core\getCurrentDate(), getInsertId(), and DAO\update().
Referenced by build().
| NotificationDAO::newDataObject | ( | ) |
Instantiate and return a new data object.
Definition at line 120 of file NotificationDAO.inc.php.
Referenced by _fromRow(), and build().
| NotificationDAO::setDateRead | ( | $notificationId, | |
| $dateRead | |||
| ) |
Retrieve Notifications by notification id
| $notificationId | int |
| $dateRead | date |
Definition at line 104 of file NotificationDAO.inc.php.
References DAO\datetimeToDB(), and DAO\update().
| NotificationDAO::transferNotifications | ( | $oldUserId, | |
| $newUserId | |||
| ) |
Transfer the notifications for a user.
| $oldUserId | int |
| $newUserId | int |
Definition at line 279 of file NotificationDAO.inc.php.
References DAO\update().