]> Raphaƫl G. Git Repositories - airbundle/blobdiff - Controller/DefaultController.php
Set the policy text
[airbundle] / Controller / DefaultController.php
index 4f8559f44740ec64f48c8e151b2c4420b7f77a3c..86a280f3128afc8260cd3a90801ed27021e2d4bc 100644 (file)
@@ -11,7 +11,7 @@ use Symfony\Component\Form\FormError;
 use Symfony\Component\HttpFoundation\Request;
 use Symfony\Component\Mailer\Exception\TransportExceptionInterface;
 use Symfony\Component\Mailer\MailerInterface;
-use Symfony\Component\Mime\NamedAddress;
+use Symfony\Component\Mime\Address;
 use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
 use Symfony\Component\Routing\RouterInterface;
 use Symfony\Component\Translation\TranslatorInterface;
@@ -78,10 +78,10 @@ class DefaultController extends AbstractController {
                                //Create message
                                $message = (new TemplatedEmail())
                                        //Set sender
-                                       ->from(new NamedAddress($data['mail'], $data['name']))
+                                       ->from(new Address($data['mail'], $data['name']))
                                        //Set recipient
                                        //XXX: remove the debug set in vendor/symfony/mime/Address.php +46
-                                       ->to(new NamedAddress($this->config['contact']['mail'], $this->config['contact']['name']))
+                                       ->to(new Address($this->config['contact']['mail'], $this->config['contact']['name']))
                                        //Set subject
                                        ->subject($data['subject'])
 
@@ -125,7 +125,7 @@ class DefaultController extends AbstractController {
        /**
         * The index page
         */
-       public function index(Request $request) {
+       public function index() {
                //Set section
                $section = $this->translator->trans('Index');
 
@@ -139,7 +139,7 @@ class DefaultController extends AbstractController {
        /**
         * The policy page
         */
-       public function policy(Request $request) {
+       public function policy() {
                //Set section
                $section = $this->translator->trans('Policy');