PHP Class Bolt\Storage\Query\SearchConfig

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

Protected Properties

Property Type Description
$config array | Bolt\Config
$joins array
$searchableTypes array

Public Methods

Method 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.

Protected Methods

Method 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 method

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

getConfig() public method

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

getFieldConfig() public method

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

getJoins() public method

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

getSearchableColumns() protected method

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

isInvisible() protected method

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

parseContenttypes() protected method

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

parseTaxonomies() protected method

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
return void

Property Details

$config protected_oe property

protected array|Config,Bolt $config
return array | Bolt\Config

$joins protected_oe property

protected array $joins
return array

$searchableTypes protected_oe property

protected array $searchableTypes
return array