PHPackages                             abdualiym/yii2-block - 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. abdualiym/yii2-block

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

abdualiym/yii2-block
====================

Yii2 block extension

1.1.4(5y ago)12222BSD-3-ClausePHPCI failing

Since May 8Pushed 5y ago1 watchersCompare

[ Source](https://github.com/Abdualiym/yii2-block)[ Packagist](https://packagist.org/packages/abdualiym/yii2-block)[ Docs](https://www.github.com/)[ RSS](/packages/abdualiym-yii2-block/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (8)Versions (15)Used By (0)

yii2-block extension
====================

[](#yii2-block-extension)

The extension allows manage block of html contents, files, images.

### Installation

[](#installation)

- Install with composer:

```
composer require abdualiym/yii2-block "^1.1"
```

- **After composer install** run console command for create tables:

```
php yii migrate/up --migrationPath=@vendor/abdualiym/yii2-block/migrations
```

- Setup in common config storage and language configurations.

> language indexes related with database columns.

> Admin panel tabs render by array values order.

> Begin id param value from 0.

```
'modules' => [
    'block' => [ // don`t change module key
        'class' => '@abdualiym\block\Module',
        'storageRoot' => $params['staticPath'],
        'storageHost' => $params['staticHostInfo'],
        'thumbs' => [ // 'sm' and 'md' keys are reserved
            'admin' => ['width' => 128, 'height' => 128],
            'thumb' => ['width' => 320, 'height' => 320],
        ],
        'languages' => [
            'ru' => [
                'id' => 0,
                'name' => 'Русский',
            ],
            'uz' => [
                'id' => 1,
                'name' => 'English',
            ],
        ],
    ],
]
```

- In admin panel add belove links for manage categories and blocks:

```
/block/categories/index
/block/block/index?slug=your_category_slug_name
```

> For using BlockController actions you must manual specify their category slug in route.

### Examples

[](#examples)

Extension registers next language arrays to Yii::$app-&gt;params\[\] for use in views:

```
\Yii::$app->params['cms']['languageIds'][$prefix] = $language['id'];
[
    'en' => 2,
    'ru' => 1,
    ...
]

\Yii::$app->params['cms']['languages'][$prefix] = $language['name'];
[
    'en' => 'English',
    ...
]

\Yii::$app->params['cms']['languages2'][$language['id']] = $language['name'];
[
    2 => 'English',
    ...
]
```

### Frontend widgets integration

[](#frontend-widgets-integration)

> get all blocks by category slug

```
abdualiym\block\entities\Blocks::getBySlug($slug)

```

> get each block data for current app language:

```
$blocks = Blocks::getBySlug($slug);
foreach ($blocks as $block) {
    echo ($blockObject->getModelByType())->get();
}

```

---

> TODO

- Copy from extension root directory example widgets for frontend integration

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 96% 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 ~41 days

Recently: every ~57 days

Total

14

Last Release

2029d ago

Major Versions

0.0.1 → 1.0.92020-03-05

### Community

Maintainers

![](https://www.gravatar.com/avatar/8afe769498e5b199a71bb9d878a98244c426af072b5341a2d65930371db83297?d=identicon)[Abdualiym](/maintainers/Abdualiym)

---

Top Contributors

[![Abdualiym](https://avatars.githubusercontent.com/u/10773154?v=4)](https://github.com/Abdualiym "Abdualiym (24 commits)")[![ShamsiddinToshmirzaev](https://avatars.githubusercontent.com/u/51586940?v=4)](https://github.com/ShamsiddinToshmirzaev "ShamsiddinToshmirzaev (1 commits)")

---

Tags

frameworkhtmlyii2blocksinfo

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/abdualiym-yii2-block/health.svg)

```
[![Health](https://phpackages.com/badges/abdualiym-yii2-block/health.svg)](https://phpackages.com/packages/abdualiym-yii2-block)
```

###  Alternatives

[skeeks/cms

SkeekS CMS — control panel and tools based on php framework Yii2

13825.6k47](/packages/skeeks-cms)[beaten-sect0r/yii2-core

Yii2 Core project template

771.1k](/packages/beaten-sect0r-yii2-core)[tecnocen/yii2-formgenerator

Yii 2 Library to configure form generator

145.7k](/packages/tecnocen-yii2-formgenerator)

PHPackages © 2026

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