2017 © Pedro Peláez
 

yii2-extension yii2-slug-behavior

Yii2 slug behavior

image

zelenin/yii2-slug-behavior

Yii2 slug behavior

  • Sunday, February 14, 2016
  • by zelenin
  • Repository
  • 5 Watchers
  • 51 Stars
  • 26,406 Installations
  • PHP
  • 16 Dependents
  • 0 Suggesters
  • 14 Forks
  • 0 Open issues
  • 22 Versions
  • 4 % Grown

The README.md

Yii2 slug behavior

Yii2 slug behavior, (*1)

Installation

Composer

The preferred way to install this extension is through Composer., (*2)

Either run php composer.phar require zelenin/yii2-slug-behavior "~1.5.1", (*3)

or add "zelenin/yii2-slug-behavior": "~1.5.1" to the require section of your composer.json, (*4)

Using

Attach the behavior in your model:, (*5)

public function behaviors()
{
    return [
        'slug' => [
            'class' => 'Zelenin\yii\behaviors\Slug',
            'slugAttribute' => 'slug',
            'attribute' => 'name',
            // optional params
            'ensureUnique' => true,
            'replacement' => '-',
            'lowercase' => true,
            'immutable' => false,
            // If intl extension is enabled, see http://userguide.icu-project.org/transforms/general. 
            'transliterateOptions' => 'Russian-Latin/BGN; Any-Latin; Latin-ASCII; NFD; [:Nonspacing Mark:] Remove; NFC;'
        ]
    ];
}

Slug may be generated from multiple and related attributes:, (*6)

public function behaviors()
{
    return [
        'slug' => [
            ...
            'attribute' => ['name', 'language.username'],
            ...
        ]
    ];
}

Author

Aleksandr Zelenin, e-mail: aleksandr@zelenin.me, (*7)

The Versions

14/02 2016

dev-master

9999999-dev https://github.com/zelenin/yii2-slug-behavior

Yii2 slug behavior

  Sources   Download

MIT

The Requires

 

yii2 behavior slug

14/02 2016
23/12 2015
21/08 2015

1.0.1

1.0.1.0 https://github.com/zelenin/yii2-slug-behavior

Yii2 slug behavior

  Sources   Download

MIT

The Requires

 

yii2 yii behavior slug

29/07 2015

1.0.0

1.0.0.0 https://github.com/zelenin/yii2-slug-behavior

Yii2 slug behavior

  Sources   Download

MIT

The Requires

 

yii2 yii behavior slug

16/06 2015
26/04 2015
25/10 2014

0.2.2

0.2.2.0 https://github.com/zelenin/yii2-slug-behavior

Yii2 slug behavior

  Sources   Download

MIT

The Requires

 

yii2 yii behavior slug

17/10 2014

0.2.0

0.2.0.0 https://github.com/zelenin/yii2-slug-behavior

Yii2 slug behavior

  Sources   Download

MIT

The Requires

 

yii2 yii behavior slug

17/10 2014

0.2.1

0.2.1.0 https://github.com/zelenin/yii2-slug-behavior

Yii2 slug behavior

  Sources   Download

MIT

The Requires

 

yii2 yii behavior slug

29/04 2014

0.1.2

0.1.2.0 https://github.com/zelenin/yii2-slug-behavior

Yii2 slug behavior

  Sources   Download

MIT

The Requires

 

yii2 yii behavior slug

20/04 2014

0.1.0

0.1.0.0 https://github.com/zelenin/yii2-slug-behavior

Yii2 slug behavior

  Sources   Download

MIT

The Requires

 

yii2 yii behavior slug

30/03 2014

0.0.3

0.0.3.0 https://github.com/zelenin/yii2-slug-behavior

Yii2 slug behavior

  Sources   Download

MIT

The Requires

 

yii2 yii behavior slug

16/02 2014

0.0.1

0.0.1.0 https://github.com/zelenin/yii2-slug-behavior

Yii2 slug behavior

  Sources   Download

MIT

The Requires

 

yii2 yii behavior slug

16/02 2014

0.0.2

0.0.2.0 https://github.com/zelenin/yii2-slug-behavior

Yii2 slug behavior

  Sources   Download

MIT

The Requires

 

yii2 yii behavior slug