public function getAll($key)
    {
        $template = EmailTemplate::find()
            ->byKey($key)
            ->with('translations')
            ->one();

        return empty($template->translations) ? null : $template->translations;
    }
public function getAll($key)
    {
        $template = EmailTemplate::find()
            ->byKey($key)
            ->with('translations')
            ->one();

        return empty($template->translations) ? null : $template->translations;
    }
public function getAll ( $ key ) { $ template = EmailTemplate :: find ( ) -> byKey ( $ key ) -> with ( 'translations' ) -> one ( ) ; return empty ( $ template -> translations ) ? null : $ template -> translations ; }
Find all language versions of template by key.

@param string $key

@return EmailTemplateTranslation[]|null
Find all language versions of template by key .