Aimeos\Shop\Base\Context::addMailer PHP Method

addMailer() protected method

Adds the mailer object to the context
protected addMailer ( Aimeos\MShop\Context\Item\Iface $context ) : Aimeos\MShop\Context\Item\Iface
$context Aimeos\MShop\Context\Item\Iface 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;
    }