CommentNotifyController.php in Comment Notify 8
File
src/Controller/CommentNotifyController.php
View source
<?php
namespace Drupal\comment_notify\Controller;
use Drupal\Core\Controller\ControllerBase;
class CommentNotifyController extends ControllerBase {
public function disable($hash) {
module_load_include('inc', 'comment_notify', 'comment_notify');
if (comment_notify_unsubscribe_by_hash($hash)) {
return [
'#markup' => $this
->t('Your comment follow-up notification for this post was disabled. Thanks.'),
];
}
else {
return [
'#markup' => $this
->t('Sorry, there was a problem unsubscribing from notifications.'),
];
}
}
}