PHPackages                             asbsoft/yii2-common\_2\_170212 - 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. asbsoft/yii2-common\_2\_170212

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

asbsoft/yii2-common\_2\_170212
==============================

Experimental common Yii2 extensions for ASB-projects

2.14.8(7y ago)0279BSD-3-ClausePHPPHP &gt;=5.4.0

Since Apr 9Pushed 7y ago1 watchersCompare

[ Source](https://github.com/asbsoft/yii2-common_2_170212)[ Packagist](https://packagist.org/packages/asbsoft/yii2-common_2_170212)[ RSS](/packages/asbsoft-yii2-common-2-170212/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (6)Versions (34)Used By (9)

Common useful Yii2 extensions for united modules in ASB-projects
================================================================

[](#common-useful-yii2-extensions-for-united-modules-in-asb-projects)

I like Yii2 framework, but I would like more tools for build independent, reusable and inheritable modules in this framework.

Here is some experimental extensions for my projects provided by "united modules".

Yii2 has two applications template - basic and advanced. To satisfy both need more complicated configs which too many in Yii2. I will prepare examples of applications configs...

Notes
-----

[](#notes)

- Add to system all dependencies defined in "require" part of composer.json.
- Use autoload.php here to register additional autoloads.
- Register namespace \\asb\\yii2\\common\_2\_170212 in system by composer or manually by define alias f.e. Yii::setAlias('@asb/yii2/common\_2\_170212', '@vendor/asbsoft/yii2-common\_2\_170212'); This definition you can place in index.php, most common config(s) or better way in @vendor/yiisoft/extensions.php to provide work in any of basic/frontend/backend/console application.
- Make you own config files in config folder. Use \*.EXAMPLES.php files as examples.
- Run migrations.
- To use additional functionality need to extends modules from \\asb\\yii2\\common\_2\_170212\\base\\UniModule, controllers - from \\asb\\yii2\\common\_2\_170212\\controllers\\BaseController and BaseAdminController, and active records models - from asb\\yii2\\common\_2\_170212\\models\\DataModel. Also add to application config in 'components' =&gt; \[ //... 'view' =&gt; \[ 'class' =&gt; 'asb\\yii2\\common\_2\_170212\\web\\UniView', \], // to work with views inherinance This operationd provide mechanism of modules inheritance: configs and messages will merged, views and actions will get from latest child.
- Extension also has some functionality for switching multilanguage support provide by asb\\yii2\\common\_2\_170212\\i18n\\LangHelper and bootstraping by asb\\yii2\\common\_2\_170212\\base\\CommonBootstrap.

Using modules inheritance
-------------------------

[](#using-modules-inheritance)

- Extends your ancestor module from base\\UniModule. You can create another module with module class in root directory extends of ancestor module class. Than add this module as submodule to config of application or another module-container.
- Now work such features:

    - configs and params will merge with ancestors' data
    - messages will merge
    - for route(s) get latest file(s)
    - for view(s) get latest file(s) - possible to redefine only required file(s)
    - controllers and models - traditional inheritance
    - to use models inheritans you have to (re)define using models in config/config.php of module in format alias =&gt; class name or object array: 'models' =&gt; \[..., 'ALIAS' =&gt; 'VENDOR\\yii2\\modules\\MODULE\_NAME\\models\\News', ...\] for example 'News' =&gt; 'asb\\yii2\\modules\\news\_1\\models\\News', // in module-ancestor 'News' =&gt; 'asb\\yii2\\modules\\news\_2\\models\\News', // in module-child and for access to model you have to use everywhere (only for models in modules extends UniModule):
        - $module-&gt;getDataModel($alias, $params = \[\], $config = \[\]) // get and init module object or same static method: ModuleClassName::model($alias, $params = \[\], $config = \[\])
    - to use assets inheritans you have to (re)define using assetss in config/config.php of module in format alias =&gt; class name: 'models' =&gt; \[..., 'ALIAS' =&gt; 'CLASSNAME', ...\] and in view use $assets = $this-&gt;context-&gt;module-&gt;registerAsset('MyAsset', $this); instead of $assets = MyAsset::register($this); and in new asset better use old asset as 'depends' not as a child - new CSS-files will include after and will redefine old styles

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity69

Established project with proven stability

 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.

###  Release Activity

Cadence

Every ~20 days

Recently: every ~64 days

Total

32

Last Release

2692d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/99133681c4373355173f654ac247924f96a0f406e5f20b45ec5793185a11c2d6?d=identicon)[asbsoft](/maintainers/asbsoft)

---

Top Contributors

[![asbsoft](https://avatars.githubusercontent.com/u/18103286?v=4)](https://github.com/asbsoft "asbsoft (104 commits)")

---

Tags

extensionsyii2

### Embed Badge

![Health badge](/badges/asbsoft-yii2-common-2-170212/health.svg)

```
[![Health](https://phpackages.com/badges/asbsoft-yii2-common-2-170212/health.svg)](https://phpackages.com/packages/asbsoft-yii2-common-2-170212)
```

PHPackages © 2026

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