public function getTemplates($key)
    {
        /** @var EmailTemplateTranslation[] $templates */
        if ($templates = EmailTemplateTranslation::findAll([
            'template_id' => EmailTemplate::getIdByKey($key)
        ])) {
            return Template::buildTemplates($templates);
        }

        return null;
    }
public function getTemplates($key)
    {
        /** @var EmailTemplateTranslation[] $templates */
        if ($templates = EmailTemplateTranslation::findAll([
            'template_id' => EmailTemplate::getIdByKey($key)
        ])) {
            return Template::buildTemplates($templates);
        }

        return null;
    }
public function getTemplates ( $ key ) { /** @var EmailTemplateTranslation[] $templates */ if ( $ templates = EmailTemplateTranslation :: findAll ( [ 'template_id' => EmailTemplate :: getIdByKey ( $ key ) ] ) ) { return Template :: buildTemplates ( $ templates ) ; } return null ; }
Getting email template models by key

@param string $key
@return null|Template[]
Getting email template models by key