Class: Decidim::Conferences::ConferenceRegistrationNotificationEvent

Inherits:
Events::BaseEvent
  • Object
show all
Includes:
Events::NotificationEvent, SanitizeHelper
Defined in:
app/events/decidim/conferences/conference_registration_notification_event.rb

Instance Method Summary collapse

Instance Method Details

#i18n_optionsObject



13
14
15
16
17
18
19
20
# File 'app/events/decidim/conferences/conference_registration_notification_event.rb', line 13

def i18n_options
  {
    resource_title: resource_title,
    resource_path: resource_path,
    resource_url: resource_url,
    scope: event_name
  }
end

#notification_titleObject



9
10
11
# File 'app/events/decidim/conferences/conference_registration_notification_event.rb', line 9

def notification_title
  I18n.t("notification_title", **i18n_options).html_safe
end

#resource_titleObject



22
23
24
25
26
27
28
# File 'app/events/decidim/conferences/conference_registration_notification_event.rb', line 22

def resource_title
  return unless resource

  title = decidim_sanitize_translated(resource.title)

  Decidim::ContentProcessor.render_without_format(title, links: false).html_safe
end