PHP Trait Bolt\Extension\ConfigTrait

Author: Carson Full ([email protected])
Afficher le fichier Open project: bolt/bolt

Méthodes publiques

Méthode Description
getName ( ) : string
getVendor ( ) : string

Méthodes protégées

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

Méthode 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 méthode

Call this in register method.
protected extendConfigService ( )

getBaseDirectory() abstract protected méthode

abstract protected getBaseDirectory ( ) : Bolt\Filesystem\Handler\DirectoryInterface
Résultat Bolt\Filesystem\Handler\DirectoryInterface

getConfig() protected méthode

Returns the config for the extension.
protected getConfig ( ) : array
Résultat array

getContainer() abstract protected méthode

abstract protected getContainer ( ) : Pimple
Résultat Pimple

getDefaultConfig() protected méthode

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

getName() abstract public méthode

abstract public getName ( ) : string
Résultat string

getVendor() abstract public méthode

abstract public getVendor ( ) : string
Résultat string

registerFields() protected méthode

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