public function getTemplate($key, $language_id)
    {
        if ($template = EmailTemplateTranslation::findOne([
            'template_id' => EmailTemplate::getIdByKey($key),
            'language_id' => $language_id
        ])) {
            return Template::buildTemplate($template);
        }

        return null;
    }
public function getTemplate($key, $language_id)
    {
        if ($template = EmailTemplateTranslation::findOne([
            'template_id' => EmailTemplate::getIdByKey($key),
            'language_id' => $language_id
        ])) {
            return Template::buildTemplate($template);
        }

        return null;
    }
public function getTemplate ( $ key , $ language_id ) { if ( $ template = EmailTemplateTranslation :: findOne ( [ 'template_id' => EmailTemplate :: getIdByKey ( $ key ) , 'language_id' => $ language_id ] ) ) { return Template :: buildTemplate ( $ template ) ; } return null ; }
Getting email template model by key

@param string $key
@param integer $language_id
@return null|Template
Getting email template model by key