1. Go to this page and download the library: Download andrewdanilov/yii2-helpers library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
andrewdanilov / yii2-helpers example snippets
$attribute_rules = [
'name' => [ModelHelper::ATTR_RULE_STRIP_TAGS],
'text' => [ModelHelper::ATTR_RULE_CLEAN_JS, ModelHelper::ATTR_RULE_STRIP_TAGS],
'<attribute>' => [<attr_rule1>, <attr_rule2>, <attr_rule3>, ...],
'*' => [<attr_rule4>, ...], // для всех атрибутов, даже если для них уже применялось правило
'?' => [<attr_rule5>, ...], // только для атрибутов, для которых не указано правило
];