2 namespace wcf\system\user\notification\object\type;
3 use wcf\data\comment\Comment;
4 use wcf\data\comment\CommentList;
5 use wcf\system\user\notification\object\CommentUserNotificationObject;
9 * Represents a comment notification object type for comments on articles.
11 * @author Joshua Ruesweg
12 * @copyright 2001-2018 WoltLab GmbH
13 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
14 * @package WoltLabSuite\Core\System\User\Notification\Object\Type
17 class ArticleCommentUserNotificationObjectType extends AbstractUserNotificationObjectType implements ICommentUserNotificationObjectType {
21 protected static $decoratorClassName = CommentUserNotificationObject::class;
26 protected static $objectClassName = Comment::class;
31 protected static $objectListClassName = CommentList::class;
36 public function getOwnerID($objectID) {
37 $sql = "SELECT article.userID
38 FROM wcf".WCF_N."_comment comment
39 LEFT JOIN wcf".WCF_N."_article article
40 ON (article.articleID = comment.objectID)
41 WHERE comment.commentID = ?";
42 $statement = WCF::getDB()->prepareStatement($sql);
43 $statement->execute([$objectID]);
45 return $statement->fetchSingleColumn() ?: 0;