PHP Class creocoder\taggable\TaggableBehavior

Author: Alexander Kochetov ([email protected])
Inheritance: extends yii\base\Behavior
Afficher le fichier Open project: creocoder/yii2-taggable Class Usage Examples

Méthodes publiques

Свойство Type Description
$tagFrequencyAttribute the tags model frequency attribute name
$tagRelation the tags relation name
$tagValueAttribute the tags model value attribute name
$tagValuesAsArray whether to return tags as array instead of string

Méthodes publiques

Méthode Description
addTagValues ( string | string[] $values ) Adds tags.
afterSave ( ) : void
beforeDelete ( ) : void
events ( )
filterTagValues ( string | string[] $values ) : string[] Filters tags.
getTagValues ( boolean | null $asArray = null ) : string | string[] Returns tags.
hasTagValues ( string | string[] $values ) : boolean Returns a value indicating whether tags exists.
removeAllTagValues ( ) Removes all tags.
removeTagValues ( string | string[] $values ) Removes tags.
setTagValues ( string | string[] $values ) Sets tags.

Method Details

addTagValues() public méthode

Adds tags.
public addTagValues ( string | string[] $values )
$values string | string[]

afterSave() public méthode

public afterSave ( ) : void
Résultat void

beforeDelete() public méthode

public beforeDelete ( ) : void
Résultat void

events() public méthode

public events ( )

filterTagValues() public méthode

Filters tags.
public filterTagValues ( string | string[] $values ) : string[]
$values string | string[]
Résultat string[]

getTagValues() public méthode

Returns tags.
public getTagValues ( boolean | null $asArray = null ) : string | string[]
$asArray boolean | null
Résultat string | string[]

hasTagValues() public méthode

Returns a value indicating whether tags exists.
public hasTagValues ( string | string[] $values ) : boolean
$values string | string[]
Résultat boolean

removeAllTagValues() public méthode

Removes all tags.
public removeAllTagValues ( )

removeTagValues() public méthode

Removes tags.
public removeTagValues ( string | string[] $values )
$values string | string[]

setTagValues() public méthode

Sets tags.
public setTagValues ( string | string[] $values )
$values string | string[]

Property Details

$tagFrequencyAttribute public_oe property

the tags model frequency attribute name
public $tagFrequencyAttribute

$tagRelation public_oe property

the tags relation name
public $tagRelation

$tagValueAttribute public_oe property

the tags model value attribute name
public $tagValueAttribute

$tagValuesAsArray public_oe property

whether to return tags as array instead of string
public $tagValuesAsArray