You are here

function comment_notify_get_notification_type in Comment Notify 8

Same name and namespace in other branches
  1. 7 comment_notify.inc \comment_notify_get_notification_type()

Get the type of notification for a comment notification record.

Parameters

int $cid: The comment id.

Return value

int Return the notification type.

5 calls to comment_notify_get_notification_type()
CommentNotifyAnonymousTest::testAnonymousAllCommentsTest in tests/src/Functional/CommentNotifyAnonymousTest.php
Tests the "All comments" notification option used by an anonymous user.
CommentNotifyAnonymousTest::testAnonymousRepliesTest in tests/src/Functional/CommentNotifyAnonymousTest.php
Tests the "Replies to my comment" option used by anonymous user.
CommentNotifyConfigPageTest::testUnsubscribePage in tests/src/Functional/CommentNotifyConfigPageTest.php
Tests the Unsubscribe page.
comment_notify_form_comment_form_alter in ./comment_notify.module
Add the comment_notify fields in the comment form.
_comment_notify_submit_comment_form in ./comment_notify.module
Additional submit handler for the comment form.

File

./comment_notify.inc, line 102
Contains functions which utilize the database and other internal helpers.

Code

function comment_notify_get_notification_type($cid) {
  return \Drupal::database()
    ->select('comment_notify', 'cn')
    ->fields('cn', [
    'notify',
  ])
    ->condition('cid', $cid)
    ->execute()
    ->fetchField();
}