Bolt\Storage\Query\SearchConfig::getFieldConfig PHP Method

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
    public function getFieldConfig($contentType, $field)
    {
        if (isset($this->searchableTypes[$contentType][$field])) {
            return $this->searchableTypes[$contentType][$field];
        }
        return false;
    }

Usage Example

Beispiel #1
0
 public function testTagsTaxonomyWeighting()
 {
     $app = $this->getApp();
     $search = new SearchConfig($app['config']);
     $fieldConfig = $search->getFieldConfig('entries', 'tags');
     $this->assertEquals(75, $fieldConfig['weight']);
 }