Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 

README.md

Sluggble behavior

Поведение для транслитерации кирилицы в латиницу.

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist zabachok/yii2-sluggable-behavior "*"

or add

"zabachok/yii2-sluggable-behavior": "*"

to the require section of your composer.json file.

Usage

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

Behavior for transliterate russian text to latin.

Использовать так же как и оригинальное поведение. Класс унаследован от \yii\behaviors\SluggableBehavior просто переопределен метод generateSlug

use zabachok\behaviors\SluggableBehavior;

public function behaviors()
{
	 return [
		 [
			 'class' => SluggableBehavior::className(),
			 'attribute' => 'title',
			 // 'slugAttribute' => 'slug',
		 ],
	 ];
}

About

No description, website, or topics provided.

Resources

Languages

You can’t perform that action at this time.