PHPackages                             digitv/yii2live - 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. digitv/yii2live

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

digitv/yii2live
===============

Yii2 Live package

1.2.2(6y ago)050MITPHP

Since Dec 7Pushed 5y ago2 watchersCompare

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

READMEChangelog (5)Dependencies (4)Versions (7)Used By (0)

Yii2live SANDBOX project!
=========================

[](#yii2live-sandbox-project)

This extension helps you with AJAX links, forms and modals.

Application AJAX response is divided into:

- JS/CSS files;
- inline JS/CSS;
- Page widgets output;
- JS commands.

And all of these things are processed separately. So you can return only few javascript commands and no more else, or just one widget (as old good Pjax), or whole page, but only widgets, state of those were changed.

For example your `Nav` widget can decide what to do by itself - render widget fully or just change active link. There are special widget states for this.

Creating AJAX link
------------------

[](#creating-ajax-link)

```
echo \digitv\yii2live\helpers\Html::a('Ajax link', ['action'])
    ->ajax(true)
    ->context(Yii2Live::CONTEXT_TYPE_PARTIAL)
    ->pushState(false)
    ->requestMethod('post')
    ->confirm('Confirm message');

```

- Link is AJAX enabled (`ajax(true)`),
- using a `partial` context `context(Yii2Live::CONTEXT_TYPE_PARTIAL)`,
- page url is not changed on click (`->pushState(false)`),
- request method is POST (`requestMethod('post')`),
- and using confirm message (`confirm('Confirm message')`).

Creating HtmlContainer like a Pjax
----------------------------------

[](#creating-htmlcontainer-like-a-pjax)

```
...

...

```

All links inside this container will be AJAX enabled. Search form, that will update this container is looks like this:

```

...

```

or this

```

...

```

Using JS commands
-----------------

[](#using-js-commands)

```
...
    public function actionTest() {
        $live = Yii2Live::getSelf();
        $content = $this->render('test');
        if($live->isLiveRequest()) {
            $cmd = $live->commands();
            return $cmd->jHtml('#insert-selector', 'New HTML!')
                ->jRemove('#remove-selector')
                ->modalBody($content)
                ->modalTitle('Modal title')
                ->messageSuccess('Success message!');
        } else {
            return $content;
        }
    }
...

```

- jHtml - jQuery.html()
- jRemove - jQuery.remove()
- modalBody - Set modal body content
- modalTitle - Set modal title content
- messageSuccess - Show success message to user

There are much more JS commands that you can use (@see in `digitv\yii2live\components\JsCommand`)

### *Config options*

[](#config-options)

OptionDescriptionenable*Global enabled flag*enableLiveLoad*Enable "live" request for each link and form*enableReplaceAnimation*Enable replace animation for each widget*enableLoadingOverlay*Enable loading animation as animated overlay*headerName*Header name used for "request ID" sending*headerNameContext*Header name used for "context ID" sending*linkSelector*jQuery selector for links (only when `enableLiveLoad` active)*linkSelectorAjax*jQuery selector for links*formSelector*jQuery selector for forms (only when `enableLiveLoad` active)*formSelectorAjax*jQuery selector for forms*fieldSelectorAjax*jQuery selector for form fields (change event)*messageAdapter*Name of message adapter. Used to show messages for user (`alert` or `notify`)*modalDefaultSelector*jQuery selector for default modal popup*modalDefaultRender*Render default modal or not*modalDefaultId*Default modal ID*modalDefaultSize*Default modal size (`sm`/`lg` or `empty`)*modalDefaultWithFooterClose*Show close button in modal footer*

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity67

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 ~158 days

Recently: every ~197 days

Total

6

Last Release

2288d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/11768817?v=4)[Volodymyr Kovalenko](/maintainers/digitv)[@digitv](https://github.com/digitv)

---

Top Contributors

[![digitv](https://avatars.githubusercontent.com/u/11768817?v=4)](https://github.com/digitv "digitv (142 commits)")

---

Tags

yii2ajaxnodejslive

### Embed Badge

![Health badge](/badges/digitv-yii2live/health.svg)

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

###  Alternatives

[skeeks/cms

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

13825.6k47](/packages/skeeks-cms)[callmez/yii2-wechat

The wechat module for the Yii framework

3841.1k](/packages/callmez-yii2-wechat)[conquer/modal

Extension for the Yii2 framework

1521.5k](/packages/conquer-modal)[marekpetras/yii2-ajax-box-widget

Ajax Box widget for Yii 2 Framework.

1814.6k](/packages/marekpetras-yii2-ajax-box-widget)[beaten-sect0r/yii2-core

Yii2 Core project template

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

PHPackages © 2026

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