PHP Класс Bolt\Storage\Query\SearchConfig

This takes into account contenttypes that aren't searchable along with taxonomy and field weightings.
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$config array | Bolt\Config
$joins array
$searchableTypes array

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

Метод Описание
__construct ( Config $config )
getConfig ( string $contentType ) : array | false Get the config of all fields for a given content type.
getFieldConfig ( string $contentType, string $field ) : array | false Get the config of one given field for a given content type.
getJoins ( string $contentType ) : array Helper method to return the join search columns for a ContentType weighting based on type.

Защищенные методы

Метод Описание
getSearchableColumns ( string $type ) : void Determine what columns are searchable for a given ContentType.
isInvisible ( string $contentType ) : boolean Does some checks to see whether a ContentType should appear in search results.
parseContenttypes ( ) : void Iterates over the main config and delegates weighting to both searchable columns and searchable taxonomies.
parseTaxonomies ( string $contentType, array $taxonomies ) : void Iterates the taxonomies for a given ContentType, then assigns a weighting based on type.

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

__construct() публичный Метод

public __construct ( Config $config )
$config Bolt\Config

getConfig() публичный Метод

Get the config of all fields for a given content type.
public getConfig ( string $contentType ) : array | false
$contentType string
Результат array | false

getFieldConfig() публичный Метод

Get the config of one given field for a given content type.
public getFieldConfig ( string $contentType, string $field ) : array | false
$contentType string
$field string
Результат array | false

getJoins() публичный Метод

Helper method to return the join search columns for a ContentType weighting based on type.
public getJoins ( string $contentType ) : array
$contentType string
Результат array

getSearchableColumns() защищенный Метод

Determine what columns are searchable for a given ContentType.
protected getSearchableColumns ( string $type ) : void
$type string
Результат void

isInvisible() защищенный Метод

This is based on ContentType options.
protected isInvisible ( string $contentType ) : boolean
$contentType string
Результат boolean

parseContenttypes() защищенный Метод

Iterates over the main config and delegates weighting to both searchable columns and searchable taxonomies.
protected parseContenttypes ( ) : void
Результат void

parseTaxonomies() защищенный Метод

Iterates the taxonomies for a given ContentType, then assigns a weighting based on type.
protected parseTaxonomies ( string $contentType, array $taxonomies ) : void
$contentType string
$taxonomies array
Результат void

Описание свойств

$config защищенное свойство

protected array|Config,Bolt $config
Результат array | Bolt\Config

$joins защищенное свойство

protected array $joins
Результат array

$searchableTypes защищенное свойство

protected array $searchableTypes
Результат array