PHPackages                             ofilin/yii2-sweetalert - 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. ofilin/yii2-sweetalert

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

ofilin/yii2-sweetalert
======================

SweetAlert Asset

0.1(6y ago)06MITPHP

Since Jun 27Pushed 6y agoCompare

[ Source](https://github.com/ofilin/yii2-sweetalert)[ Packagist](https://packagist.org/packages/ofilin/yii2-sweetalert)[ RSS](/packages/ofilin-yii2-sweetalert/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

 [![SweetAlert2](./swal2-logo.png)](./swal2-logo.png)

yii2-sweetalert
===============

[](#yii2-sweetalert)

This asset override standard JavaScript `yii.confirm` method. Plugin [SweetAlert2](https://sweetalert2.github.io/)

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

[](#installation)

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

Either run

```
composer require --prefer-dist ofilin/yii2-sweetalert "*"

```

or add

```
"ofilin/yii2-sweetalert": "*"

```

to the require section of your `composer.json` file and run `composer update`

Configure
---------

[](#configure)

In your Asset file add this SweetAlertAsset:

```
public $depends = [
        'yii\web\YiiAsset',
        'yii\bootstrap\BootstrapAsset',
        \ofilin\sweetalert\SweetAlertAsset::class,
    ];

```

or register in view file:

```
\ofilin\sweetalert\SweetAlertAsset::register($this);

```

Show alerts:
------------

[](#show-alerts)

Basic alert

```

```

Flash alert:

```
// in controller
Yii::$app->session->setFlash('success', "Статья сохранена");

```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

2512d ago

### Community

Maintainers

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

---

Top Contributors

[![ofilin](https://avatars.githubusercontent.com/u/2737936?v=4)](https://github.com/ofilin "ofilin (1 commits)")

---

Tags

yii2sweetalert

### Embed Badge

![Health badge](/badges/ofilin-yii2-sweetalert/health.svg)

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

###  Alternatives

[dmstr/yii2-cookie-consent

Yii2 Cookie Consent Widget

1452.6k](/packages/dmstr-yii2-cookie-consent)

PHPackages © 2026

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