bundle/Factory/EmailDataFactory.php
protected function resolveBody(TemplateData $data)
    {
        if ($data->getTemplateWrapper()->hasBlock(Constants::BLOCK_EMAIL)) {
            return $data->getTemplateWrapper()
                ->renderBlock(
                    Constants::BLOCK_EMAIL,
                    array(
                        'event' => $data->getEvent(),
                        'collected_fields' => $data->getEvent()->getInformationCollectionStruct()->getCollectedFields(),
                        'content' => $data->getContent(),
                        'default_variables' => !empty($this->config[ConfigurationConstants::DEFAULT_VARIABLES])
                            ? $this->config[ConfigurationConstants::DEFAULT_VARIABLES] : null,
                    )
                );
        }

        throw new MissingEmailBlockException(
            $data->getTemplateWrapper()->getSourceContext()->getName(),
            $data->getTemplateWrapper()->getBlockNames()
        );
    }
protected function resolveBody(TemplateData $data)
    {
        if ($data->getTemplateWrapper()->hasBlock(Constants::BLOCK_EMAIL)) {
            return $data->getTemplateWrapper()
                ->renderBlock(
                    Constants::BLOCK_EMAIL,
                    array(
                        'event' => $data->getEvent(),
                        'collected_fields' => $data->getEvent()->getInformationCollectionStruct()->getCollectedFields(),
                        'content' => $data->getContent(),
                        'default_variables' => !empty($this->config[ConfigurationConstants::DEFAULT_VARIABLES])
                            ? $this->config[ConfigurationConstants::DEFAULT_VARIABLES] : null,
                    )
                );
        }

        throw new MissingEmailBlockException(
            $data->getTemplateWrapper()->getSourceContext()->getName(),
            $data->getTemplateWrapper()->getBlockNames()
        );
    }
protected function resolveBody ( TemplateData $ data ) { if ( $ data -> getTemplateWrapper ( ) -> hasBlock ( Constants :: BLOCK_EMAIL ) ) { return $ data -> getTemplateWrapper ( ) -> renderBlock ( Constants :: BLOCK_EMAIL , array ( 'event' => $ data -> getEvent ( ) , 'collected_fields' => $ data -> getEvent ( ) -> getInformationCollectionStruct ( ) -> getCollectedFields ( ) , 'content' => $ data -> getContent ( ) , 'default_variables' => ! empty ( $ this -> config [ ConfigurationConstants :: DEFAULT_VARIABLES ] ) ? $ this -> config [ ConfigurationConstants :: DEFAULT_VARIABLES ] : null , ) ) ; } throw new MissingEmailBlockException ( $ data -> getTemplateWrapper ( ) -> getSourceContext ( ) -> getName ( ) , $ data -> getTemplateWrapper ( ) -> getBlockNames ( ) ) ; }
Renders email template.

@param TemplateData $data

@throws MissingEmailBlockException

@return string
Renders email template .