You are here

function admin_content_notification_node_update in Admin Content Notification 8.3

Same name and namespace in other branches
  1. 8 admin_content_notification.module \admin_content_notification_node_update()
  2. 8.2 admin_content_notification.module \admin_content_notification_node_update()
  3. 7.2 admin_content_notification.module \admin_content_notification_node_update()

Implements hook_node_update().

File

./admin_content_notification.module, line 36
Module File, consist all related hooks.

Code

function admin_content_notification_node_update(EntityInterface $node) {
  if (!empty(\Drupal::config('admin_content_notification.settings')
    ->get('admin_content_notification_trigger_on_node_update')) && \Drupal::service('admin_content_notification.common')
    ->isCurrentUserRoleAllowedToSendNotification()) {
    \Drupal::service('admin_content_notification.common')
      ->sendMail($node);
  }
}