PHP Интерфейс Cartalyst\Tags\TaggableInterface

Показать файл Открыть проект

Открытые методы

Метод Описание
addTag ( string $name ) : void Attaches the given tag to the entity.
allTags ( ) : Builder Returns all the tags under the entity namespace.
createTagsModel ( ) : Model Creates a new model instance.
getSlugGenerator ( ) : string Returns the slug generator.
getTagsDelimiter ( ) : string Returns the tags delimiter.
getTagsModel ( ) : string Returns the Eloquent tags model name.
prepareTags ( string | array $tags ) : array Prepares the given tags before being saved.
removeTag ( string $name ) : void Detaches the given tag from the entity.
scopeWhereTag ( Builder $query, string | array $tags, string $type = 'slug' ) : Builder Returns the entities with only the given tags.
scopeWithTag ( Builder $query, string | array $tags, string $type = 'slug' ) : Builder Returns the entities with one of the given tags.
scopeWithoutTag ( Builder $query, string | array $tags, string $type = 'slug' ) : Builder Returns the entities that do not have one of the given tags.
setSlugGenerator ( string $name ) : void Sets the slug generator.
setTags ( string | array $tags, string $type = 'name' ) : boolean Attaches or detaches the given tags.
setTagsDelimiter ( string $delimiter ) Sets the tags delimiter.
setTagsModel ( string $model ) : void Sets the Eloquent tags model name.
tag ( string | array $tags ) : boolean Attaches multiple tags to the entity.
tags ( ) : Illuminate\Database\Eloquent\Relations\MorphToMany Returns the entity Eloquent tag model object.
untag ( string | array | null $tags = null ) : boolean Detaches multiple tags from the entity or if no tags are passed, removes all the attached tags from the entity.

Описание методов

addTag() публичный метод

Attaches the given tag to the entity.
public addTag ( string $name ) : void
$name string
Результат void

allTags() публичный статический метод

Returns all the tags under the entity namespace.
public static allTags ( ) : Builder
Результат Illuminate\Database\Eloquent\Builder

createTagsModel() публичный статический метод

Creates a new model instance.
public static createTagsModel ( ) : Model
Результат Illuminate\Database\Eloquent\Model

getSlugGenerator() публичный статический метод

Returns the slug generator.
public static getSlugGenerator ( ) : string
Результат string

getTagsDelimiter() публичный статический метод

Returns the tags delimiter.
public static getTagsDelimiter ( ) : string
Результат string

getTagsModel() публичный статический метод

Returns the Eloquent tags model name.
public static getTagsModel ( ) : string
Результат string

prepareTags() публичный метод

Prepares the given tags before being saved.
public prepareTags ( string | array $tags ) : array
$tags string | array
Результат array

removeTag() публичный метод

Detaches the given tag from the entity.
public removeTag ( string $name ) : void
$name string
Результат void

scopeWhereTag() публичный статический метод

Returns the entities with only the given tags.
public static scopeWhereTag ( Builder $query, string | array $tags, string $type = 'slug' ) : Builder
$query Illuminate\Database\Eloquent\Builder
$tags string | array
$type string
Результат Illuminate\Database\Eloquent\Builder

scopeWithTag() публичный статический метод

Returns the entities with one of the given tags.
public static scopeWithTag ( Builder $query, string | array $tags, string $type = 'slug' ) : Builder
$query Illuminate\Database\Eloquent\Builder
$tags string | array
$type string
Результат Illuminate\Database\Eloquent\Builder

scopeWithoutTag() публичный статический метод

Returns the entities that do not have one of the given tags.
public static scopeWithoutTag ( Builder $query, string | array $tags, string $type = 'slug' ) : Builder
$query Illuminate\Database\Eloquent\Builder
$tags string | array
$type string
Результат Illuminate\Database\Eloquent\Builder

setSlugGenerator() публичный статический метод

Sets the slug generator.
public static setSlugGenerator ( string $name ) : void
$name string
Результат void

setTags() публичный метод

Attaches or detaches the given tags.
public setTags ( string | array $tags, string $type = 'name' ) : boolean
$tags string | array
$type string
Результат boolean

setTagsDelimiter() публичный статический метод

Sets the tags delimiter.
public static setTagsDelimiter ( string $delimiter )
$delimiter string

setTagsModel() публичный статический метод

Sets the Eloquent tags model name.
public static setTagsModel ( string $model ) : void
$model string
Результат void

tag() публичный метод

Attaches multiple tags to the entity.
public tag ( string | array $tags ) : boolean
$tags string | array
Результат boolean

tags() публичный метод

Returns the entity Eloquent tag model object.
public tags ( ) : Illuminate\Database\Eloquent\Relations\MorphToMany
Результат Illuminate\Database\Eloquent\Relations\MorphToMany

untag() публичный метод

Detaches multiple tags from the entity or if no tags are passed, removes all the attached tags from the entity.
public untag ( string | array | null $tags = null ) : boolean
$tags string | array | null
Результат boolean