PHPackages                             sadovojav/yii2-inline-widgets-behavior - 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. sadovojav/yii2-inline-widgets-behavior

ActiveYii2-extension

sadovojav/yii2-inline-widgets-behavior
======================================

Add widget into content

17992PHP

Since Sep 26Pushed 10y ago1 watchersCompare

[ Source](https://github.com/sadovojav/yii2-inline-widgets-behavior)[ Packagist](https://packagist.org/packages/sadovojav/yii2-inline-widgets-behavior)[ RSS](/packages/sadovojav-yii2-inline-widgets-behavior/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Yii2 inline widget
==================

[](#yii2-inline-widget)

This is a fork [howardEagle/yii2-inline-widgets-behavior](https://github.com/howardEagle/yii2-inline-widgets-behavior)

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

[](#installation)

### Composer

[](#composer)

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

Either run `php composer.phar require sadovojav/yii2-inline-widgets-behavior ""dev-master"`

or add `"sadovojav/yii2-inline-widgets-behavior": ""dev-master"` to the require section of your `composer.json`

Config
------

[](#config)

1. Add the runtime widgets in your config file:

```
'params' => [
     // ...
    'runtimeWidgets' => [
        'sadovojav\gallery\widgets\Gallery'
    ]
]
```

- runtimeWidgets must contain list of widgets

2. Add behavior in your controller:

```
public function behaviors()
{
    return [
        'InlineWidgetsBehavior' => [
            'class' => sadovojav\iwb\InlineWidgetsBehavior::className(),
            'widgets' => Yii::$app->params['runtimeWidgets'],
        ]
    ];
}
```

- string `namespace` = `` - Default namespace
- string `startBlock` = `[*` - Start inline widget block
- string `endBlock` = `*]` - End inline widget block
- string `classSuffix` = `` - Default widget Class suffix
- string `cacheDuration` = `0` - Default cache duration

3. Add decodeWidget in view:

```

```

Using
-----

[](#using)

Add decodeWidget in view:

```

```

For insert widgets in content you can use string of this format in your text:

```
[|=[;=]]

```

##### For example:

[](#for-example)

```
Lorem ipsum

Gallery 1
[*Gallery*]

Gallery (with attr)
[*Gallery|template=tpl-1*]

Gallery (with inner caching)
[*Gallery|template=tpl-1;cache=300*]
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

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/0c17a869a6d802f11218035a8936a1feb52479d8695584a3a8531442d5ec81bf?d=identicon)[sadovojav](/maintainers/sadovojav)

### Embed Badge

![Health badge](/badges/sadovojav-yii2-inline-widgets-behavior/health.svg)

```
[![Health](https://phpackages.com/badges/sadovojav-yii2-inline-widgets-behavior/health.svg)](https://phpackages.com/packages/sadovojav-yii2-inline-widgets-behavior)
```

PHPackages © 2026

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