PHP Class Owl\Services\TagService

Inheritance: extends Service
Show file Open project: owl/owl

Protected Properties

Property Type Description
$searchService
$tagRepo

Public Methods

Method Description
__construct ( Owl\Repositories\TagRepositoryInterface $tagRepo, SearchService $searchService )
deleteFlowFlag ( $tag_id ) : boolean Delete a flow tag settings.
getAll ( ) : Collection get all tags.
getAllFlowTags ( ) : Collection get all flow tags.
getAllUsedTags ( ) : array get all used tags.
getById ( integer $id ) : void get a tag by tag id.
getByName ( string $name ) : void get a tag by tag name.
getTagIdsByTagNames ( array $tag_names ) : array get tag ids by tag names.
syncTags ( object $item, array $tag_ids ) : void sync tags
updateFlowFlag ( $tag_id, $flag = true ) : Illuminate\Database\Eloquent\Model Update a tag's flow_flag.

Method Details

__construct() public method

public __construct ( Owl\Repositories\TagRepositoryInterface $tagRepo, SearchService $searchService )
$tagRepo Owl\Repositories\TagRepositoryInterface
$searchService SearchService

deleteFlowFlag() public method

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

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 ) : void
$id integer
return void

getByName() public method

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

getTagIdsByTagNames() public method

get tag ids by tag names.
public getTagIdsByTagNames ( array $tag_names ) : array
$tag_names array
return array

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 ( $tag_id, $flag = true ) : Illuminate\Database\Eloquent\Model
return Illuminate\Database\Eloquent\Model

Property Details

$searchService protected property

protected $searchService

$tagRepo protected property

protected $tagRepo