PHP Trait Bolt\Extension\ConfigTrait

Author: Carson Full ([email protected])
显示文件 Open project: bolt/bolt

Public Methods

Method Description
getName ( ) : string
getVendor ( ) : string

Protected Methods

Method Description
extendConfigService ( ) Call this in register method.
getBaseDirectory ( ) : Bolt\Filesystem\Handler\DirectoryInterface
getConfig ( ) : array Returns the config for the extension.
getContainer ( ) : Pimple
getDefaultConfig ( ) : array Override this to provide a default configuration, which will be used in the absence of a config file.
registerFields ( ) : Bolt\Storage\Field\FieldInterface[] Register a list of Bolt fields.

Private Methods

Method Description
addConfig ( Bolt\Filesystem\Handler\YamlFile $file ) Merge in a yaml file to the config.
copyDistFile ( Bolt\Filesystem\Handler\YamlFile $file ) Copy config.yml.dist to config/extensions.

Method Details

extendConfigService() protected method

Call this in register method.
protected extendConfigService ( )

getBaseDirectory() abstract protected method

abstract protected getBaseDirectory ( ) : Bolt\Filesystem\Handler\DirectoryInterface
return Bolt\Filesystem\Handler\DirectoryInterface

getConfig() protected method

Returns the config for the extension.
protected getConfig ( ) : array
return array

getContainer() abstract protected method

abstract protected getContainer ( ) : Pimple
return Pimple

getDefaultConfig() protected method

Override this to provide a default configuration, which will be used in the absence of a config file.
protected getDefaultConfig ( ) : array
return array

getName() abstract public method

abstract public getName ( ) : string
return string

getVendor() abstract public method

abstract public getVendor ( ) : string
return string

registerFields() protected method

Example:
 return [
     new ColourPickField(),
 ];
protected registerFields ( ) : Bolt\Storage\Field\FieldInterface[]
return Bolt\Storage\Field\FieldInterface[]