dev-master
9999999-devTemplate Message with placeholder
BSD-3-Clause
The Requires
template extension yii2 message
v1.0
1.0.0.0Template Message with placeholder
BSD-3-Clause
The Requires
template extension yii2 message
Template Message with placeholder
Template Message with placeholder, (*1)
The preferred way to install this extension is through composer., (*3)
Either run, (*4)
php composer.phar require --prefer-dist ignatenkovnikita/yii2-template-messages "*"
or add, (*5)
"ignatenkovnikita/yii2-template-messages": "*"
to the require section of your composer.json
file., (*6)
Once the extension is installed, simply use it in your code by :, (*7)
'modules'=>[ 'template' => [ 'class' => 'ignatenkovnikita\template\Module', ], ],
In Code uses, (*8)
Template::replace('template_name', [ 'your_variable' => 'value ]);
Example Add in migration, (*9)
$rows = [ [ 'promo-code-send', 'Отправка купона пользователю', '["promo_code"]', 'Трэк {promo_code}' ], ]; $this->batchInsert('{{template}}', ['id', 'title', 'placeholders', 'message'], $rows); $this->update('{{%template}}',['widget_options' => '{"toolbar":false,"pastePlainText":true,"buttonSource":true,"paragraphize":false}']);
Apply migration, (*10)
./console/yii migrate --migrationPath=vendor/ignatenkovnikita/yii2-template-messages/migrations/
TODO - add suppport email - refactoring, (*11)
Template Message with placeholder
BSD-3-Clause
template extension yii2 message
Template Message with placeholder
BSD-3-Clause
template extension yii2 message