PHP Class Owl\Repositories\Eloquent\TagRepository

Inheritance: implements Owl\Repositories\TagRepositoryInterface
ファイルを表示 Open project: owl/owl

Protected Properties

Property Type Description
$tag
$tagFts

Public Methods

Method Description
__construct ( Tag $tag, TagFts $tagFts )
deleteFlowFlag ( $tag_id ) : boolean Delete a flow tag settings.
firstOrCreateByName ( string $name ) : Illuminate\Database\Eloquent\Model get a tag or Create a tag.
getAll ( ) : Collection get all tags.
getAllFlowTags ( ) : Collection get all flow tags.
getAllUsedTags ( ) : array get all used tags.
getById ( integer $id ) : Collection get a tag by tag id.
getByName ( string $name ) : Collection get a tag by tag name.
syncTags ( object $item, array $tag_ids ) : void sync tags
updateFlowFlag ( integer $tag_id, boolean $flag = true ) : Illuminate\Database\Eloquent\Model Update a tag's flow_flag.

Method Details

__construct() public method

public __construct ( Tag $tag, TagFts $tagFts )
$tag Owl\Repositories\Eloquent\Models\Tag
$tagFts Owl\Repositories\Eloquent\Models\TagFts

deleteFlowFlag() public method

Delete a flow tag settings.
public deleteFlowFlag ( $tag_id ) : boolean
$tag_id int tag_id
return boolean

firstOrCreateByName() public method

get a tag or Create a tag.
public firstOrCreateByName ( string $name ) : Illuminate\Database\Eloquent\Model
$name string
return Illuminate\Database\Eloquent\Model

getAll() public method

get all tags.
public getAll ( ) : Collection
return Collection

getAllFlowTags() public method

get all flow tags.
public getAllFlowTags ( ) : Collection
return Collection

getAllUsedTags() public method

get all used tags.
public getAllUsedTags ( ) : array
return array

getById() public method

get a tag by tag id.
public getById ( integer $id ) : Collection
$id integer
return Collection

getByName() public method

get a tag by tag name.
public getByName ( string $name ) : Collection
$name string
return Collection

syncTags() public method

sync tags
public syncTags ( object $item, array $tag_ids ) : void
$item object
$tag_ids array
return void

updateFlowFlag() public method

Update a tag's flow_flag.
public updateFlowFlag ( integer $tag_id, boolean $flag = true ) : Illuminate\Database\Eloquent\Model
$tag_id integer
$flag boolean
return Illuminate\Database\Eloquent\Model

Property Details

$tag protected_oe property

protected $tag

$tagFts protected_oe property

protected $tagFts