Download the PHP package black-lamp/yii2-email-templates without Composer
On this page you can find all versions of the php package black-lamp/yii2-email-templates. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package yii2-email-templates
Email templates module for Yii2
Module for adding templates for email letters across dashboard
Installation
Run command
or add
to the require section of your composer.json.
Applying migrations
Add module to application config
Backend module for create, edit and delete email templates
languageProvider
it's a class that implements LanguageProviderInterface.
You can use language providers from this extension or create yours.
This extension has two language providers.
Database language provider configuration properties
Option | Description | Type | Default |
---|---|---|---|
tableName | Name of table in database with languages | string | language |
idField | Name of field in language table with primary key | string | id |
idName | Name of field in language table with language name | string | name |
Config language provider configuration properties
Option | Description | Type | Default |
---|---|---|---|
languages | Array with languages. Example [1 => 'English', 2 => 'Russian'] |
array | - |
defaultLanguage | Array with default language. Array must contains one value. Example [1 => 'English'] |
array | - |
Add component to application config
Component for getting the templates from database
Using
1) Create the template with markers across dashboard
Email subject
New message from {sitename}
Email body
Hello, {username}!
Text...
Go to the link - {link}
2) Get template by key with component help
This method return a Template object.
3) You should to parse the markers in email subject and email body
4) Now you can using this template
All versions of yii2-email-templates with dependencies
yiisoft/yii2 Version ^2.0.4
yiisoft/yii2-bootstrap Version ^2.0.0
2amigos/yii2-tinymce-widget Version ~1.1