src/Command/UserEditCommand.php
protected function sendNotification($to, array $changedValues)
    {
        $message = \Swift_Message::newInstance()
            ->setSubject('User details updated')
            ->setFrom($this->getContainer()->getParameter('fos_user.resetting.email.from_email'))
            ->setTo($to)
            ->setBody(
                $this->getContainer()->get('twig')->render(
                    '@WebtownKunstmaanExtension/email/user_edit.html.twig',
                    ['changes' => $changedValues]
                ),
                'text/html'
            );
        $this->getContainer()->get('mailer')->send($message);
    }
protected function sendNotification($to, array $changedValues)
    {
        $message = \Swift_Message::newInstance()
            ->setSubject('User details updated')
            ->setFrom($this->getContainer()->getParameter('fos_user.resetting.email.from_email'))
            ->setTo($to)
            ->setBody(
                $this->getContainer()->get('twig')->render(
                    '@WebtownKunstmaanExtension/email/user_edit.html.twig',
                    ['changes' => $changedValues]
                ),
                'text/html'
            );
        $this->getContainer()->get('mailer')->send($message);
    }
protected function sendNotification ( $ to , array $ changedValues ) { $ message = \ Swift_Message :: newInstance ( ) -> setSubject ( 'User details updated' ) -> setFrom ( $ this -> getContainer ( ) -> getParameter ( 'fos_user.resetting.email.from_email' ) ) -> setTo ( $ to ) -> setBody ( $ this -> getContainer ( ) -> get ( 'twig' ) -> render ( '@WebtownKunstmaanExtension/email/user_edit.html.twig' , [ 'changes' => $ changedValues ] ) , 'text/html' ) ; $ this -> getContainer ( ) -> get ( 'mailer' ) -> send ( $ message ) ; }
Send email notification about changes

@param       $to
@param array $changedValues
Send email notification about changes