2017 © Pedro Peláez
 

yii2-extension yii2-helpers

Yii-Framework small helpers

image

meliorator/yii2-helpers

Yii-Framework small helpers

  • Tuesday, May 29, 2018
  • by meliorator
  • Repository
  • 1 Watchers
  • 0 Stars
  • 23 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 5 % Grown

The README.md

My small helper classes for yii2

for using migration class template, need added this code, (*1)

'controllerMap' => [
        'migrate' => [
            'class' => 'yii\console\controllers\MigrateController',
            'templateFile' => '@app/vendor/meliorator/yii2-helpers/migration_template.php',
        ],
    ],

for use localization site

  • add to config/web.php components section follow code
'i18n' => [
            'translations' => [
                'app*' => [
                    'class' => 'yii\i18n\PhpMessageSource',
                    'basePath' => '@app/messages',
                    'sourceLanguage' => 'en-US',
                    'fileMap' => [
                        'app'       => 'app.php',
//                        'app/error' => 'error.php',
                    ],
                ],
            ],
        ],
  • add support languages to params
'langs' => [
        'en' => 'English', 'ua' => 'Українська', 'ru' => 'Русский'
    ],
'defaultLangId' => 'en',
  • attach behavior LocalizeBehavior to Controller
public function behaviors() {
        return ArrayHelper::merge(parent::behaviors(), [
                'localizeBehavior' => LocalizeBehavior::className(),
            ]
        );
    }

The Versions

29/05 2018

dev-master

9999999-dev

Yii-Framework small helpers

  Sources   Download

MIT

The Requires

 

by Laba Mykola

extension yii2 helpers

14/10 2017

dev-test

dev-test

Yii-Framework small helpers

  Sources   Download

MIT

The Requires

 

by Laba Mykola

extension yii2 helpers