@@ -104,7 +104,7 @@ |
||
104 | 104 | |
105 | 105 | protected static function defineSources(string $context = null): array |
106 | 106 | { |
107 | - $forms = array_unique(array_map(function (ContactFormSubmission $submission) { |
|
107 | + $forms = array_unique(array_map(function(ContactFormSubmission $submission) { |
|
108 | 108 | return $submission->form; |
109 | 109 | }, self::find()->all())); |
110 | 110 |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | Craft::$app->session->setNotice(Craft::t('contact-form-extensions', 'The Contact Form plugin is not installed or activated, Contact Form Extensions does not work without it.')); |
85 | 85 | } |
86 | 86 | |
87 | - Event::on(View::class, View::EVENT_BEFORE_RENDER_TEMPLATE, function (TemplateEvent $e) { |
|
87 | + Event::on(View::class, View::EVENT_BEFORE_RENDER_TEMPLATE, function(TemplateEvent $e) { |
|
88 | 88 | if ( |
89 | 89 | $e->template === 'settings/plugins/_settings' && |
90 | 90 | $e->variables['plugin'] === $this |
@@ -97,14 +97,14 @@ discard block |
||
97 | 97 | } |
98 | 98 | }); |
99 | 99 | |
100 | - Event::on(UrlManager::class, UrlManager::EVENT_REGISTER_CP_URL_RULES, function (RegisterUrlRulesEvent $event) { |
|
100 | + Event::on(UrlManager::class, UrlManager::EVENT_REGISTER_CP_URL_RULES, function(RegisterUrlRulesEvent $event) { |
|
101 | 101 | $event->rules = array_merge($event->rules, [ |
102 | 102 | 'contact-form-extensions/submissions/<submissionId:\d+>' => 'contact-form-extensions/submissions/show-submission', |
103 | 103 | 'contact-form-extensions/submissions/<submissionId:\d+>/<siteHandle:{handle}>' => 'contact-form-extensions/submissions/show-submission', |
104 | 104 | ]); |
105 | 105 | }); |
106 | 106 | |
107 | - Event::on(Mailer::class, Mailer::EVENT_BEFORE_SEND, function (SendEvent $e) { |
|
107 | + Event::on(Mailer::class, Mailer::EVENT_BEFORE_SEND, function(SendEvent $e) { |
|
108 | 108 | if ($e->isSpam) { |
109 | 109 | return; |
110 | 110 | } |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | } |
145 | 145 | }); |
146 | 146 | |
147 | - Event::on(Mailer::class, Mailer::EVENT_AFTER_SEND, function (SendEvent $e) { |
|
147 | + Event::on(Mailer::class, Mailer::EVENT_AFTER_SEND, function(SendEvent $e) { |
|
148 | 148 | if ($this->settings->enableConfirmationEmail) { |
149 | 149 | // First set the template mode to the Site templates |
150 | 150 | Craft::$app->view->setTemplateMode(View::TEMPLATE_MODE_SITE); |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | Event::on( |
174 | 174 | CraftVariable::class, |
175 | 175 | CraftVariable::EVENT_INIT, |
176 | - function (Event $event) { |
|
176 | + function(Event $event) { |
|
177 | 177 | /** @var CraftVariable $variable */ |
178 | 178 | $variable = $event->sender; |
179 | 179 | $variable->set('contactFormExtensions', ContactFormExtensionsVariable::class); |
@@ -22,13 +22,13 @@ |
||
22 | 22 | * @since 1.0.0 |
23 | 23 | */ |
24 | 24 | return [ |
25 | - 'Form Submissions' => 'Innsendelser', |
|
26 | - 'All submissions' => 'Alle innsendelser', |
|
27 | - 'Form' => 'Skjema', |
|
28 | - 'Subject' => 'Emne', |
|
29 | - 'From Name' => 'Fra navn', |
|
30 | - 'From Email' => 'Fra e-post', |
|
31 | - 'Message' => 'Melding', |
|
32 | - 'Date Created' => 'Innsendt', |
|
33 | - 'Back to overview' => 'Tilbake til oversikt', |
|
25 | + 'Form Submissions' => 'Innsendelser', |
|
26 | + 'All submissions' => 'Alle innsendelser', |
|
27 | + 'Form' => 'Skjema', |
|
28 | + 'Subject' => 'Emne', |
|
29 | + 'From Name' => 'Fra navn', |
|
30 | + 'From Email' => 'Fra e-post', |
|
31 | + 'Message' => 'Melding', |
|
32 | + 'Date Created' => 'Innsendt', |
|
33 | + 'Back to overview' => 'Tilbake til oversikt', |
|
34 | 34 | ]; |