diff --git a/lib/Features/Microsoft/Utils/Email/ConfirmedQuotationEmail.php b/lib/Features/Microsoft/Utils/Email/ConfirmedQuotationEmail.php index 1f4e683..e38cb12 100644 --- a/lib/Features/Microsoft/Utils/Email/ConfirmedQuotationEmail.php +++ b/lib/Features/Microsoft/Utils/Email/ConfirmedQuotationEmail.php @@ -12,66 +12,6 @@ use Features\Microsoft; use INIT; -class ConfirmedQuotationEmail extends AbstractEmail { +class ConfirmedQuotationEmail extends \Features\Outsource\Email\ConfirmedQuotationEmail { - protected $title = 'Confirmed Quotation'; - protected $internal_project_id; - protected $internal_job_id; - protected $external_project_id; - protected $project_words_count; - - - public function __construct( $templatePath ) { - - $this->_setLayout( 'skeleton.html' ); - $this->_setTemplateByPath( $templatePath ); - } - - public function send() { - $config = Microsoft::getConfig(); - $this->sendTo( $config[ 'success_quotation_email_address' ], "Translated Team" ); - } - - public function setInternalIdProject( $id ) { - $this->internal_project_id = $id; - } - - public function setInternalJobId( $id ) { - $this->internal_job_id = $id; - } - - public function setExternalProjectId( $id ) { - $this->external_project_id = $id; - } - - public function setProjectWordsCount( $count ) { - $this->project_words_count = $count; - } - - protected function _getTemplateVariables() { - return [ - 'internal_project_id' => $this->internal_project_id, - 'internal_job_id' => $this->internal_job_id, - 'external_project_id' => $this->external_project_id, - 'project_words_count' => $this->project_words_count, - ]; - } - - protected function _getLayoutVariables() { - $vars = parent::_getLayoutVariables(); - $vars[ 'title' ] = $this->title; - - return $vars; - } - - - protected function _getDefaultMailConf() { - $mailConf = parent::_getDefaultMailConf(); - - $mailConf[ 'from' ] = INIT::$MAILER_RETURN_PATH; - $mailConf[ 'sender' ] = INIT::$MAILER_RETURN_PATH; - $mailConf[ 'returnPath' ] = INIT::$MAILER_RETURN_PATH; - - return $mailConf; - } } diff --git a/lib/Features/Microsoft/Utils/Email/ErrorQuotationEmail.php b/lib/Features/Microsoft/Utils/Email/ErrorQuotationEmail.php index 2df0540..36c6355 100644 --- a/lib/Features/Microsoft/Utils/Email/ErrorQuotationEmail.php +++ b/lib/Features/Microsoft/Utils/Email/ErrorQuotationEmail.php @@ -13,72 +13,6 @@ use Features\Microsoft; use INIT; -class ErrorQuotationEmail extends AbstractEmail { +class ErrorQuotationEmail extends \Features\Outsource\Email\ErrorQuotationEmail { - protected $title = 'Project creation went in error'; - protected $message; - protected $internal_project_id; - protected $internal_job_id; - protected $external_project_id; - protected $project_words_count; - - - public function __construct( $templatePath ) { - - $this->_setLayout( 'skeleton.html' ); - $this->_setTemplateByPath( $templatePath ); - } - - public function send() { - $config = Microsoft::getConfig(); - $this->sendTo( $config[ 'error_quotation_email_address' ], "Translated Team" ); - } - - public function setErrorMessage( $message ) { - $this->message = $message; - } - - public function setInternalIdProject( $id ) { - $this->internal_project_id = $id; - } - - public function setInternalJobId( $id ) { - $this->internal_job_id = $id; - } - - public function setExternalProjectId( $id ) { - $this->external_project_id = $id; - } - - public function setProjectWordsCount( $count ) { - $this->project_words_count = $count; - } - - protected function _getTemplateVariables() { - return [ - 'internal_project_id' => $this->internal_project_id, - 'internal_job_id' => $this->internal_job_id, - 'external_project_id' => $this->external_project_id, - 'project_words_count' => $this->project_words_count, - 'message' => $this->message - ]; - } - - protected function _getLayoutVariables() { - $vars = parent::_getLayoutVariables(); - $vars[ 'title' ] = $this->title; - - return $vars; - } - - - protected function _getDefaultMailConf() { - $mailConf = parent::_getDefaultMailConf(); - - $mailConf[ 'from' ] = INIT::$MAILER_RETURN_PATH; - $mailConf[ 'sender' ] = INIT::$MAILER_RETURN_PATH; - $mailConf[ 'returnPath' ] = INIT::$MAILER_RETURN_PATH; - - return $mailConf; - } }