PHPackages                             tez/yii2-cms-module - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. tez/yii2-cms-module

ActiveYii2-extension[Framework](/categories/framework)

tez/yii2-cms-module
===================

Yii 2 Small CMS Module

72703PHP

Since Jan 29Pushed 10y ago3 watchersCompare

[ Source](https://github.com/Mihai-P/yii2-core)[ Packagist](https://packagist.org/packages/tez/yii2-cms-module)[ RSS](/packages/tez-yii2-cms-module/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

THIS IS AN ALPHA STATE DO NOT USE IT FOR PRODUCTION
===================================================

[](#this-is-an-alpha-state-do-not-use-it-for-production)

CMS Module
==========

[](#cms-module)

CMS Module is the start for a CMS built on Yii 2. It uses the advance yii2 template. It provides user authentication, registration and RBAC support to your Yii2 site.

Installation
------------

[](#installation)

### Note

[](#note)

How you run composer depends on how you have it installed. I usually install it as /usr/local/bin/composer so I can just run "composer" from the command line. You may need to run "php composer.phar" instead.

### Step 1

[](#step-1)

Install the advanced yii2 template. You can find the instructions here:

In a nutshell, the following commands are required:

```
composer global require "fxp/composer-asset-plugin:1.0.0-beta4"
composer create-project --prefer-dist --stability=dev yiisoft/yii2-app-advanced advanced
cd advanced
init --env=Production

```

### Step 2

[](#step-2)

Install the module. The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

From within the "advanced" directory you created above, run these commands:

```
composer update
composer require tez/yii2-cms-module "dev-master"

```

Usage
-----

[](#usage)

Once the extension is installed, modify the backend\\config\\main.php application configuration to include:

```
return [
	'modules' => [
	    ...
	        'core' => [
	            'class' => 'core\Module',
	            'attemptsBeforeCaptcha' => 3, // Optional
	        ],
	    ...
	],
	...
	'components' => [
	    ...
	    'user' => [
	        'class' => 'core\components\User',
            'enableAutoLogin' => true,
	    ],
        'authManager' => [
            'class' => 'core\components\DbManager'
        ],
        'urlManager' => [
            'class' => 'yii\web\UrlManager',
            'enablePrettyUrl' => true,
            'showScriptName' => false,
        ],
        'view' => [
            'theme' => [
                'pathMap' => [
                    '@core/views/layouts' => '@core/views/layouts',
                    '@core/views' => ['@app/views', '@core/views'],
                ],
                'baseUrl' => '@web/',
            ],
        ],
	    ...
	],
    'controllerMap' => [
        'site' => [
            'class' => 'core\controllers\SiteController',
        ],
        'elfinder' => [
            'class' => 'mihaildev\elfinder\Controller',
            'access' => ['@'], //глобальный доступ к фаил менеджеру @ - для авторизорованных , ? - для гостей , чтоб открыть всем ['@', '?']
            'disabledCommands' => ['netmount'], //отключение ненужных команд https://github.com/Studio-42/elFinder/wiki/Client-configuration-options#commands
            'roots' => [
                [
                    'class' => 'core\components\FrontendPath',
                    'path' => '../../frontend/web/files/images',
                    'url' => 'http://frontend.yii2/files/images',
                    'name'  => 'Public'
                ],
            ]
        ]
    ],
];
```

### Note

[](#note-1)

I have done this via just keeping a modified version of the file in deploy/backend+config+main.php It can be copied into place by running vendor/tez/yii2-cms-module/appconfig.sh

Use the new crud generator, replace in the backend/config/main-local.php the part with

```
$config['modules']['gii'] = 'yii\gii\Module';
```

with

```
    $config['modules']['gii'] = [
        'class' => 'yii\gii\Module',
        'generators' => [
            'crud'   => [
                'class'     => 'core\gii\crud\Generator',
                'templates' => ['crud' => '@core/gii/crud']
            ],
            'model'   => [
                'class'     => 'core\gii\model\Generator',
                'templates' => ['model' => '@core/gii/model/default']
            ],
        ]
    ];
```

### Note

[](#note-2)

This line doesn't exist if you are working from Production. It's there in development only. Are the added lines required in production and if so where do they go?

Copy .htaccess from vendor/tez/yii2-cms-module to frontend/web/ and to backend/web/

```
cp vendor/tez/yii2-cms-module/.htaccess backend/web/
cp vendor/tez/yii2-cms-module/.htaccess frontend/web/
```

In common/config/bootstrap add

```
Yii::setAlias('core', dirname(dirname(__DIR__)) . '/vendor/tez/yii2-cms-module');
Yii::setAlias('theme', dirname(dirname(__DIR__)) . '/vendor/tez/yii2-brain-theme');
```

### Note

[](#note-3)

I have done this by keeping a copy of the modified file in deploy/ as above.

Define the frontend-url in backend/config/params.php and/or backend/config/params-local.php. This is for the file picker preview. Change to match your domain

```
return [
...
    'frontend-url' => 'http://frontend.yii2/',
...
];
```

### Note

[](#note-4)

Please define what actually needs doing here. Do both files need modifying or just the one and in that case which one? Are you seriously hard coding URLs into the config?

In your common/config/params.php define the mandrill details and the logo for the notification. Change to your details.

```
return [
...
    'mandrill'=>[
        'key' => 'xxxx',
        'from_email' => 'admin@.....',
        'from_name' => 'No Reply'
    ],
    'logo' => 'http://2ezweb.net/themes/default/images/logo.png', // the logo will be merged into the email notification.
...
];
```

### Note

[](#note-5)

Really? Hard coded URLs again? Needs to be fixed.

In backend\\assets\\AppAsset.php the depend section should look like this

```
    public $depends = [
        'yii\web\YiiAsset',
        'yii\bootstrap\BootstrapAsset',
        'theme\assets\BrainAsset',
        'theme\assets\CustomAsset',
    ];
```

### Note

[](#note-6)

I have kept a copy of the modified file as before.

Run migrations:

```
$ php yii migrate/up --migrationPath=@core/migrations
```

### Note

[](#note-7)

Nope, doesn't work. What else is required here?

License
-------

[](#license)

Auth module is released under the BSD-3 License. See the bundled `LICENSE.md` for details.

URLs
----

[](#urls)

- Login: `yourhost/core/default/login`Username: Password: admin
- Logout: `yourhost/core/default/logout`
- Reset Password: `yourhost/core/default/request-password-reset`
- User management: `yourhost/core/administrator/`

Tests
-----

[](#tests)

In go to vendor/tez/yii2-cms-module/tests/codeception/backend/ run `codecept build`

to initialize the tests. Then run `codecept run functional`to run the actual tests.

You can run `codecept run functional --coverage-html`to get the code coverage. You can find the coverage in vendor/tez/yii2-cms-module/tests/codeception/backend/\_output/coverage/

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 89.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/07e369e2ec3ce7fc943ee2fb94babc2bc545bfb4b8ae740908fe488931bdc91c?d=identicon)[MihaiP](/maintainers/MihaiP)

---

Top Contributors

[![Mihai-P](https://avatars.githubusercontent.com/u/7947914?v=4)](https://github.com/Mihai-P "Mihai-P (119 commits)")[![delatbabel](https://avatars.githubusercontent.com/u/2335362?v=4)](https://github.com/delatbabel "delatbabel (13 commits)")[![isyed2k](https://avatars.githubusercontent.com/u/8877600?v=4)](https://github.com/isyed2k "isyed2k (1 commits)")

### Embed Badge

![Health badge](/badges/tez-yii2-cms-module/health.svg)

```
[![Health](https://phpackages.com/badges/tez-yii2-cms-module/health.svg)](https://phpackages.com/packages/tez-yii2-cms-module)
```

###  Alternatives

[laravel/telescope

An elegant debug assistant for the Laravel framework.

5.2k67.8M192](/packages/laravel-telescope)[spiral/roadrunner

RoadRunner: High-performance PHP application server and process manager written in Go and powered with plugins

8.4k12.2M84](/packages/spiral-roadrunner)[nolimits4web/swiper

Most modern mobile touch slider and framework with hardware accelerated transitions

41.8k177.2k1](/packages/nolimits4web-swiper)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k36.7M259](/packages/laravel-dusk)[laravel/prompts

Add beautiful and user-friendly forms to your command-line applications.

708181.8M596](/packages/laravel-prompts)[cakephp/chronos

A simple API extension for DateTime.

1.4k47.7M121](/packages/cakephp-chronos)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
