humanized/yii2-advanced-application-template-user

Yii2 module which provides functionality to deal with user access tokens.

dev-master 2016-09-09 13:45 UTC

This package is not auto-updated.

Last update: 2024-11-09 19:56:27 UTC


README

Yii2 module wrapping the user management related functionity provided by the yii2-advanced-template

Installation

Install Using Composer

The preferred way to install this extension is through composer.

Either run

$ php composer.phar require humanized/yii2-translation "*"

or add

"humanized/yii2-translation": "*"

to the require section of your composer.json file.

Run Migrations

$ php yii migrate/up --migrationPath=@vendor/humanized/yii2-advanced-application-template-user/migrations

Edit Configuration File

Add following lines to the configuration file:

'modules' => [
    'translation' => [
        'class' => 'humanized\translation\Module',
    ],
],

Adding these lines allows access to the various interfaces provided by the module. Here, the chosen module-name is translation, as such the various routes will be available at translation/controller-id/action-id, though any module-name can be chosen.

This package contains an urlManager component which extends the urlManager component provided by the Codemix Yii2-LocaleUrls package. Here setup of the default application language and population of the enabled website languages are handled automatically. Other configuration options are inherited between components.

'components' => [
..
        // Languages enabled populated through database storage
        // Further configuration options available at https://github.com/codemix/yii2-localeurls 
        'urlManager' => [
            'class' => 'humanized\translation\components\UrlManager',
            'enablePrettyUrl' => true, 
            'showScriptName' => false,
        ],
..
],