/** * Adds the mailer object to the context * * @param \Aimeos\MShop\Context\Item\Iface $context Context object * @return \Aimeos\MShop\Context\Item\Iface Modified context object */ protected function addMailer(\Aimeos\MShop\Context\Item\Iface $context) { $mail = new \Aimeos\MW\Mail\Swift(function () { return app('mailer')->getSwiftMailer(); }); $context->setMail($mail); return $context; }
/** * Adds the mailer object to the context * * @param \Aimeos\MShop\Context\Item\Iface $context Context object * @return \Aimeos\MShop\Context\Item\Iface Modified context object */ protected function addMailer(\Aimeos\MShop\Context\Item\Iface $context) { $container = $this->container; $mail = new \Aimeos\MW\Mail\Swift(function () use($container) { return $container->get('mailer'); }); $context->setMail($mail); return $context; }
/** * Adds the mailer object to the context * * @param \Aimeos\MShop\Context\Item\Iface $context Context object * @return \Aimeos\MShop\Context\Item\Iface Modified context object */ protected function addMailer(\Aimeos\MShop\Context\Item\Iface $context) { $mail = new \Aimeos\MW\Mail\Swift($this->mailer); $context->setMail($mail); return $context; }