Example #1
0
 /**
  * Generate Email Body
  *
  * @param string $template Template file in Templates/Email/
  * @param array $variables Variables for assignMultiple
  * @return string
  */
 protected function getMailBody($template, $variables)
 {
     /** @var \In2\Femanager\Utility\StandaloneViewMultiplePaths $emailBodyObject */
     $emailBodyObject = $this->objectManager->get('In2\\Femanager\\Utility\\StandaloneViewMultiplePaths');
     $emailBodyObject->getRequest()->setControllerExtensionName('Femanager');
     $emailBodyObject->getRequest()->setPluginName('Pi1');
     $emailBodyObject->getRequest()->setControllerName('New');
     $emailBodyObject->setTemplatePathAndFilename($this->div->getTemplatePath('Email/' . ucfirst($template) . '.html'));
     $emailBodyObject->setLayoutRootPaths($this->div->getTemplateFolders('layout'));
     $emailBodyObject->setPartialRootPaths($this->div->getTemplateFolders('partial'));
     $emailBodyObject->assignMultiple($variables);
     return $emailBodyObject->render();
 }