PHP Class Bolt\Storage\Query\SearchConfig

This takes into account contenttypes that aren't searchable along with taxonomy and field weightings.
Afficher le fichier Open project: bolt/bolt Class Usage Examples

Protected Properties

Свойство Type Description
$config array | Bolt\Config
$joins array
$searchableTypes array

Méthodes publiques

Méthode Description
__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.

Méthodes protégées

Méthode Description
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.

Method Details

__construct() public méthode

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

getConfig() public méthode

Get the config of all fields for a given content type.
public getConfig ( string $contentType ) : array | false
$contentType string
Résultat array | false

getFieldConfig() public méthode

Get the config of one given field for a given content type.
public getFieldConfig ( string $contentType, string $field ) : array | false
$contentType string
$field string
Résultat array | false

getJoins() public méthode

Helper method to return the join search columns for a ContentType weighting based on type.
public getJoins ( string $contentType ) : array
$contentType string
Résultat array

getSearchableColumns() protected méthode

Determine what columns are searchable for a given ContentType.
protected getSearchableColumns ( string $type ) : void
$type string
Résultat void

isInvisible() protected méthode

This is based on ContentType options.
protected isInvisible ( string $contentType ) : boolean
$contentType string
Résultat boolean

parseContenttypes() protected méthode

Iterates over the main config and delegates weighting to both searchable columns and searchable taxonomies.
protected parseContenttypes ( ) : void
Résultat void

parseTaxonomies() protected méthode

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
Résultat void

Property Details

$config protected_oe property

protected array|Config,Bolt $config
Résultat array | Bolt\Config

$joins protected_oe property

protected array $joins
Résultat array

$searchableTypes protected_oe property

protected array $searchableTypes
Résultat array