Class lispa\amos\seo\behaviors\SluggableSeoBehavior

Inheritancelispa\amos\seo\behaviors\SluggableSeoBehavior » yii\behaviors\SluggableBehavior » yii\behaviors\AttributeBehavior » yii\base\Behavior » yii\base\Object
Implementsyii\base\Configurable

Class SluggableAmosBehavior

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$attribute string|array|null The attribute or list of attributes whose value will be converted into a slug or null meaning that the $value property will be used to generate a slug. yii\behaviors\SluggableBehavior
$attributes array List of attributes that are to be automatically filled with the value specified via $value. yii\behaviors\AttributeBehavior
$ensureUnique boolean Whether to ensure generated slug value to be unique among owner class records. yii\behaviors\SluggableBehavior
$immutable boolean Whether to generate a new slug if it has already been generated before. yii\behaviors\SluggableBehavior
$maxLengthSlug lispa\amos\seo\behaviors\SluggableSeoBehavior
$owner yii\base\Component|null The owner of this behavior yii\base\Behavior
$skipUpdateOnClean boolean Whether to skip this behavior when the $owner has not been modified yii\behaviors\AttributeBehavior
$slugAttribute string The attribute that will receive the slug value yii\behaviors\SluggableBehavior
$uniqueSlugGenerator callable Slug unique value generator. yii\behaviors\SluggableBehavior
$uniqueValidator array Configuration for slug uniqueness validator. yii\behaviors\SluggableBehavior
$value callable|string|null The value that will be used as a slug. yii\behaviors\SluggableBehavior

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__call() Calls the named method which is not a class method. yii\base\Object
__construct() Constructor. yii\base\Object
__get() Returns the value of an object property. yii\base\Object
__isset() Checks if a property is set, i.e. defined and not null. yii\base\Object
__set() Sets value of an object property. yii\base\Object
__unset() Sets an object property to null. yii\base\Object
attach() Attaches the behavior object to the component. yii\base\Behavior
canGetProperty() Returns a value indicating whether a property can be read. yii\base\Object
canSetProperty() Returns a value indicating whether a property can be set. yii\base\Object
className() Returns the fully qualified name of this class. yii\base\Object
detach() Detaches the behavior object from the component. yii\base\Behavior
evaluateAttributes() Evaluates the attribute value and assigns it to the current attributes. yii\behaviors\AttributeBehavior
events() Declares event handlers for the $owner's events. yii\behaviors\AttributeBehavior
generateSeoSlug() lispa\amos\seo\behaviors\SluggableSeoBehavior
generateUniqueSeoSlug() lispa\amos\seo\behaviors\SluggableSeoBehavior
hasMethod() Returns a value indicating whether a method is defined. yii\base\Object
hasProperty() Returns a value indicating whether a property is defined. yii\base\Object
init() Initializes the object. yii\behaviors\SluggableBehavior
makeSeoUnique() lispa\amos\seo\behaviors\SluggableSeoBehavior

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
generateSlug() This method is called by getValue() to generate the slug. yii\behaviors\SluggableBehavior
generateUniqueSlug() Generates slug using configured callback or increment of iteration. yii\behaviors\SluggableBehavior
getValue() Returns the value for the current attributes. yii\behaviors\SluggableBehavior
isNewSlugNeeded() Checks whether the new slug generation is needed This method is called by getValue() to check whether the new slug generation is needed. yii\behaviors\SluggableBehavior
makeUnique() This method is called by getValue() when $ensureUnique is true to generate the unique slug. yii\behaviors\SluggableBehavior
validateSlug() Checks if given slug value is unique. yii\behaviors\SluggableBehavior

Property Details

$maxLengthSlug public property
public $maxLengthSlug null

Method Details

generateSeoSlug() public method

public void generateSeoSlug ( $text )
$text
generateUniqueSeoSlug() public method

public void generateUniqueSeoSlug ( $text )
$text
makeSeoUnique() public method

public void makeSeoUnique ( $slug )
$slug