PHPackages                             singrana/thememanager - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. singrana/thememanager

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

singrana/thememanager
=====================

Theme manager for Yii2 (simple theme managment for Yii2)

14361PHP

Since Mar 11Pushed 10y ago1 watchersCompare

[ Source](https://github.com/Singrana/thememanager)[ Packagist](https://packagist.org/packages/singrana/thememanager)[ RSS](/packages/singrana-thememanager/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Theme manager
=============

[](#theme-manager)

Theme manager for Yii2

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

[](#installation)

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

Either run

```
php composer.phar require --prefer-dist singrana/thememanager "*"

```

or add

```
"singrana/thememanager": "*"

```

to the require section of your `composer.json` file.

Usage
-----

[](#usage)

Change your application config

```
'view'=>
[

	'theme'	=>
	[
			'class'     =>	'singrana\thememanager\components\ThemeManager',
			'current'	=>	'site',

			'themes'	=>
			[
				'site'	=>
				[
					'pathMap'	=>
					[
						'@app/views'	        =>	'@app/themes/site/views',
						'@app/views/layouts'	=>	'@app/themes/site/layouts',
					],
					'defaultLayout'				=>	'//inner',
				],

			...
			],
			...
	],
],

```

If you need to change theme, use:

```
\Yii::$app->view->theme->changeTheme('themeName');

```

For dynamic create new theme:

```
\Yii::$app->view->theme->createTheme('newTheme',
[
	'pathMap'			=>
	[
		'@app/views'			=>	'@app/themes/admin/views',
		'@app/views/layouts'	=>	'@app/themes/admin/layouts',
	],
]);

```

and use new theme:

```
\Yii::$app->view->theme->changeTheme('newTheme');

```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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/1f276ea293b5b4212db5165e0e53218f53ccbf2ca51aa12b895232b4ced11d92?d=identicon)[Singrana](/maintainers/Singrana)

---

Top Contributors

[![Singrana](https://avatars.githubusercontent.com/u/4208498?v=4)](https://github.com/Singrana "Singrana (13 commits)")

### Embed Badge

![Health badge](/badges/singrana-thememanager/health.svg)

```
[![Health](https://phpackages.com/badges/singrana-thememanager/health.svg)](https://phpackages.com/packages/singrana-thememanager)
```

PHPackages © 2026

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