a417836ab58f9a8202efead806ed082da8035935
[GitHub/WoltLab/WCF.git] /
1 <?php
2 namespace wcf\system\user\notification\event;
3 use wcf\data\user\notification\UserNotification;
4 use wcf\data\user\UserProfile;
5 use wcf\system\user\notification\object\IUserNotificationObject;
6
7 /**
8 * Provides a default implementation for objects sharing common data.
9 *
10 * @author Alexander Ebert
11 * @copyright 2001-2016 WoltLab GmbH
12 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
13 * @package WoltLabSuite\Core\System\User\Notification\Event
14 */
15 abstract class AbstractSharedUserNotificationEvent extends AbstractUserNotificationEvent {
16 /**
17 * @inheritDoc
18 */
19 public function setObject(UserNotification $notification, IUserNotificationObject $object, UserProfile $author, array $additionalData = []) {
20 parent::setObject($notification, $object, $author, $additionalData);
21
22 $this->prepare();
23 }
24
25 /**
26 * Provide specialized handlers with object ids, these ids will be collected and should be
27 * read once the first time data is requested from the notification event.
28 */
29 abstract protected function prepare();
30 }