public static function getSendMessageTemplates($destination) {
    $email_message_templates = [];
    /** @var \Drupal\message\MessageTemplateInterface[] $message_templates */
    $message_templates = \Drupal::entityTypeManager()
      ->getStorage('message_template')
      ->loadMultiple();
    foreach ($message_templates as $message_template) {
      $destinations = $message_template->getThirdPartySetting('activity_logger', 'activity_destinations', NULL);
      if (is_array($destinations) && in_array($destination, $destinations)) {
        $email_message_templates[$message_template->id()] = $message_template->getDescription();
      }
    }
    return $email_message_templates;
  }
public static function getSendMessageTemplates($destination) {
    $email_message_templates = [];
    /** @var \Drupal\message\MessageTemplateInterface[] $message_templates */
    $message_templates = \Drupal::entityTypeManager()
      ->getStorage('message_template')
      ->loadMultiple();
    foreach ($message_templates as $message_template) {
      $destinations = $message_template->getThirdPartySetting('activity_logger', 'activity_destinations', NULL);
      if (is_array($destinations) && in_array($destination, $destinations)) {
        $email_message_templates[$message_template->id()] = $message_template->getDescription();
      }
    }
    return $email_message_templates;
  }
public static function getSendMessageTemplates ( $ destination ) { $ email_message_templates = [ ] ; /** @var \Drupal\message\MessageTemplateInterface[] $message_templates */ $ message_templates = \ Drupal :: entityTypeManager ( ) -> getStorage ( 'message_template' ) -> loadMultiple ( ) ; foreach ( $ message_templates as $ message_template ) { $ destinations = $ message_template -> getThirdPartySetting ( 'activity_logger' , 'activity_destinations' , NULL ) ; if ( is_array ( $ destinations ) && in_array ( $ destination , $ destinations ) ) { $ email_message_templates [ $ message_template -> id ( ) ] = $ message_template -> getDescription ( ) ; } } return $ email_message_templates ; }
Returns message templates for which given destination is enabled.
Returns message templates for which given destination is enabled .