PHPackages                             rsol/yii2-alert - 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. rsol/yii2-alert

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

rsol/yii2-alert
===============

Yii-Framework widget for Flash Alerts

1.0.1(10y ago)071BSD-3-ClausePHP

Since Feb 28Pushed 10y ago1 watchersCompare

[ Source](https://github.com/RSol/yii2-alert)[ Packagist](https://packagist.org/packages/rsol/yii2-alert)[ RSS](/packages/rsol-yii2-alert/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (2)Versions (3)Used By (0)

Yii2-alert
==========

[](#yii2-alert)

Widget for add PNotify alerts in yii2 application

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

[](#installation)

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

Either run

```
php composer.phar require --prefer-dist rsol/yii2-alert "*"

```

or add

```
"rsol/yii2-alert": "*"

```

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

Usage
-----

[](#usage)

in main layout:

```
use rsol\alert\widgets\Alert;
```

```

```

you can style your PNotify by

```

```

in any place of your code:

```
Yii::$app->session->addFlash('success', Yii::t('users', 'Added social networks connections'));
```

advanced

```
Yii::$app->session->addFlash('success', [
                    'title' => Yii::t('users', 'Added social networks connections'),
                    'text' => Yii::t('users', 'Are you want to use photo from {soc} as profile photo?', [
                        'soc' => $client->getTitle(),
                    ]),
                    'addclass' => 'alert-styled-left alert-arrow-left text-sky-royal',
                    'hide' => false,
                    'confirm' => [
                        'confirm' => true,
                        'buttons' => [
                            [
                                'text' => Yii::t('users', 'YES'),
                                'addClass' => 'btn-sm',
                            ],
                            [
                                'text' => Yii::t('users', 'NO'),
                                'addClass' => 'btn-sm',
                            ]
                        ]
                    ],
                    'buttons' => [
                        'closer' => false,
                        'sticker' => false,
                    ],
                    'history' => [
                        'history' => false,
                    ],
                    'on' => [
                        'pnotify.confirm' => "function() {
                            $('.cropper').attr('src', '{$attributes['User']['photo']}');
                            $('#modal_large').modal('show');
                        }",
                    ],
                ]);
```

or JS

```
$swal = [
                    'title' => Yii::t('users', 'Added social networks connections'),
                    'text' => Yii::t('users', 'Are you want to use photo from {soc} as profile photo?', [
                        'soc' => $client->getTitle(),
                    ]),
                    'confirmButtonColor' => "#66BB6A",
                    'type' => "success",
                    'showCancelButton' => true,
                    'confirmButtonText' => Yii::t('users', 'YES'),
                    'cancelButtonText' => Yii::t('users', 'NO'),
                ];
                $ajax = [
                    'url' => Url::toRoute("/user/user/soc-image"),
                    'data' => [
                        'soc' => $filed,
                    ],
                    'success' => new JsExpression('function(data) {
                        if (data.success) {
                            $(".col-lg-3 .eg-preview img.img-circle").attr("src", data.src);
                            $("li.dropdown.dropdown-user a.dropdown-toggle img.img-circle").attr("src", data.src);
                        }
                    }'),
                    'dataType' => "json",
                ];

                Yii::$app->session->addFlash('js', 'swal(' . Json::encode($swal) . ', function(isConfirm){
                    if (isConfirm) {
                        $.ajax(' . Json::encode($ajax) . ');
                    }
                });');
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity64

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

Total

2

Last Release

3726d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a78f53b87ff94a01c9a78f14459c69bd8e37b8f9d1b4eaca7a7fb99425eef9ea?d=identicon)[RSol](/maintainers/RSol)

---

Top Contributors

[![RSol](https://avatars.githubusercontent.com/u/535813?v=4)](https://github.com/RSol "RSol (5 commits)")

---

Tags

yii2extensionnotifyalert

### Embed Badge

![Health badge](/badges/rsol-yii2-alert/health.svg)

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

###  Alternatives

[kartik-v/yii2-dialog

An asset bundle for bootstrap3-dialog for Yii 2.0 framework.

496.2M18](/packages/kartik-v-yii2-dialog)[dmstr/yii2-cookie-consent

Yii2 Cookie Consent Widget

1452.6k](/packages/dmstr-yii2-cookie-consent)[richardfan1126/yii2-js-register

Yii2 widget to register JS into view

1357.2k7](/packages/richardfan1126-yii2-js-register)

PHPackages © 2026

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