PHPackages                             yaqbick/yii2-purifier-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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. yaqbick/yii2-purifier-behavior

ActiveYii2-extension[Validation &amp; Sanitization](/categories/validation)

yaqbick/yii2-purifier-behavior
==============================

Purifier provides an ability to clean up HTML from any harmful code.

v1.0.0(10y ago)02BSD-3-ClausePHP

Since Jan 25Pushed 3y ago1 watchersCompare

[ Source](https://github.com/yaqbick/yii2-purifier-behavior)[ Packagist](https://packagist.org/packages/yaqbick/yii2-purifier-behavior)[ Docs](https://github.com/rokorolov/yii2-purifier-behavior)[ RSS](/packages/yaqbick-yii2-purifier-behavior/feed)WikiDiscussions master Synced today

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

yii2-purifier-behavior
======================

[](#yii2-purifier-behavior)

Purifier provides an ability to clean up HTML from any harmful code.

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

[](#installation)

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

Either run

```
php composer.phar require --prefer-dist rokorolov/yii2-purifier-behavior "*"

```

or add

```
"rokorolov/yii2-purifier-behavior": "*"

```

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

Usage
-----

[](#usage)

Once the extension is installed, simply use it in your code by :

Attach a behavior to model and configure.

```
use rokorolov\purifier\PurifierBehavior;

public function behaviors()
{
    return [
        // ...
        'purifierBehavior' => [
            'class' => PurifierBehavior::className(),
            'attributes' => [
                self::EVENT_BEFORE_UPDATE => ['description'],
                self::EVENT_BEFORE_INSERT => ['description'],
            ],
            'textAttributes' => [
                self::EVENT_BEFORE_UPDATE => ['title', 'slug'],
                self::EVENT_BEFORE_INSERT => ['title', 'slug']
            ]
        ],
    ];
}
```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

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

Unknown

Total

1

Last Release

3813d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

Purifieryii2extensionBehavior

### Embed Badge

![Health badge](/badges/yaqbick-yii2-purifier-behavior/health.svg)

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

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M3.1k](/packages/craftcms-cms)[paulzi/yii2-json-behavior

Yii2 json attribute behavior

75546.8k3](/packages/paulzi-yii2-json-behavior)[skeeks/cms

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

13825.8k59](/packages/skeeks-cms)[arogachev/yii2-many-to-many

Many-to-many ActiveRecord relation for Yii 2 framework

3643.1k4](/packages/arogachev-yii2-many-to-many)[kdn/yii2-domain-validator

Domain name validator for Yii 2.

11125.8k1](/packages/kdn-yii2-domain-validator)[nepstor/yii2-datetime-compare-validator

Yii2 validator for compare datetime.

1285.6k1](/packages/nepstor-yii2-datetime-compare-validator)

PHPackages © 2026

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