function _comment_notify_options in Comment Notify 8
Same name and namespace in other branches
- 6 comment_notify.module \_comment_notify_options()
- 7 comment_notify.module \_comment_notify_options()
Provide an array of available options for notification on a comment.
3 calls to _comment_notify_options()
- CommentNotifySettings::buildForm in src/
Form/ CommentNotifySettings.php - Form constructor.
- comment_notify_form_comment_form_alter in ./
comment_notify.module - Add the comment_notify fields in the comment form.
- comment_notify_form_user_form_alter in ./
comment_notify.module - Implements hook_form_alter().
File
- ./
comment_notify.module, line 29 - This module provides comment follow-up e-mail notifications.
Code
function _comment_notify_options() {
$total_options = [
COMMENT_NOTIFY_ENTITY => t('All comments'),
COMMENT_NOTIFY_COMMENT => t('Replies to my comment'),
];
$selected_options = array_filter(\Drupal::config('comment_notify.settings')
->get('available_alerts'));
$available_options = array_intersect_key($total_options, $selected_options);
return $available_options;
}