PHP Class Xpressengine\Tag\TagHandler
### app binding : xe.tag 로 바인딩 되어 있음
Tag Facade 로 접근이 가능
### 등록 및 반환
php
등록
각각의 인스턴스를 구분하기위해 대상의 인스턴스 아이디가 전달되어야 합니다.
Tag::set('instanceId', 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', ['word1', 'word2', 'word3']);
반환
$tags = Tag::get('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx');
### 자동 완성
단어를 쉽게 완성할 수 있도록 기존에 등록된 단어중 입력중인 문자와 유사한 단어들을
검색하여 반환해줍니다.
php
$tags = Tag::autoCompletion('ap');
app, application, apm, append, apple ...
显示文件
Open project: xpressengine/xpressengine
Class Usage Examples
Protected Properties
Public Methods
Protected Methods
Private Methods
Method Details
__construct()
public method
public __construct ( Decomposer $decomposer ) |
$decomposer |
Decomposer |
Decomposer instance |
attach()
protected method
createModel()
public method
detach()
protected method
public set ( string $taggableId, array $words, string | null $instanceId = null ) : Illuminate\Database\Eloquent\Collection |
$taggableId |
string |
taggable id |
$words |
array |
tag word |
$instanceId |
string | null |
instance id of taggable |
return |
Illuminate\Database\Eloquent\Collection |
model collection |
Search similar tags by given string
public similar ( string $string, integer $take = 15, string | null $instanceId = null ) : Illuminate\Database\Eloquent\Collection | static[] |
$string |
string |
partial of word |
$take |
integer |
take count |
$instanceId |
string | null |
instance id of taggable |
return |
Illuminate\Database\Eloquent\Collection | static[] |
|
similarWord()
public method
Search similar words by given string
Property Details
$decomposer protected_oe property
protected Decomposer,Xpressengine\Tag $decomposer |
return |
Decomposer |
|
$model protected_oe property
protected string $model |
return |
string |
|