PHP Класс Backend\Modules\Search\Engine\Model

Показать файл Открыть проект Примеры использования класса

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

Метод Описание
deleteSynonym ( integer $id ) Delete a synonym
existsSynonymById ( integer $id ) : boolean Check if a synonym exists
existsSynonymByTerm ( string $term, integer $exclude = null ) : boolean Check if a synonym exists
getModuleSettings ( ) : array Get modules search settings
getSynonym ( integer $id ) : array Get a synonym
insertModuleSettings ( string $module, string $searchable, string $weight ) Insert module search settings
insertSynonym ( array $item ) : integer Insert a synonym
invalidateCache ( ) Invalidate search cache
removeIndex ( string $module, integer $otherId, string $language = null ) Remove an index
saveIndex ( string $module, integer $otherId, array $fields, string $language = null ) Edit an index
updateSynonym ( array $item ) Update a synonym

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

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

Delete a synonym
public static deleteSynonym ( integer $id )
$id integer The id of the item we want to delete.

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

Check if a synonym exists
public static existsSynonymById ( integer $id ) : boolean
$id integer The id of the item we're looking for.
Результат boolean

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

Check if a synonym exists
public static existsSynonymByTerm ( string $term, integer $exclude = null ) : boolean
$term string The term we're looking for.
$exclude integer Exclude a certain id.
Результат boolean

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

Get modules search settings
public static getModuleSettings ( ) : array
Результат array

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

Get a synonym
public static getSynonym ( integer $id ) : array
$id integer The id of the item we're looking for.
Результат array

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

Insert module search settings
public static insertModuleSettings ( string $module, string $searchable, string $weight )
$module string The module wherein will be searched.
$searchable string Is the module searchable?
$weight string Weight of this module's results.

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

Insert a synonym
public static insertSynonym ( array $item ) : integer
$item array The data to insert in the db.
Результат integer

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

Invalidate search cache
public static invalidateCache ( )

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

Remove an index
public static removeIndex ( string $module, integer $otherId, string $language = null )
$module string The module wherein will be searched.
$otherId integer The id of the record.
$language string The language to use.

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

Edit an index
public static saveIndex ( string $module, integer $otherId, array $fields, string $language = null )
$module string The module wherein will be searched.
$otherId integer The id of the record.
$fields array A key/value pair of fields to index.
$language string The frontend language for this entry.

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

Update a synonym
public static updateSynonym ( array $item )
$item array The data to update in the db.