ConfigurationHelpers
        
        extends PreConfigurationHelpers
    
    
            
            in package
            
        
    
    
            
            Uses
                            FileHelpersTrait                    
    
        
        
    Tags
Table of Contents
- $globalSetup : GlobalSetup
 - global setup.
 - $interactiveConfigurator : InteractiveConfigurator
 - __construct() : mixed
 - cli() : InteractiveConfigurator
 - configFilePath() : string
 - Path to the configuration directory.
 - copyDirectoryContent() : mixed
 - copy the whole content of a directory existing in the install/ directory of the component, to the given directory.
 - copyFile() : mixed
 - copy a file from the install/ directory to an other.
 - createEntryPoint() : mixed
 - Create a new entry point.
 - declareGlobalWebAssets() : mixed
 - declare web assets into the main configuration.
 - forLocalConfiguration() : mixed
 - getConfigIni() : IniModifierArray
 - default config, main config combined with or without local config.
 - getCoordPluginConfig() : null|array<string|int, mixed>
 - return the section name of configuration of a plugin for the coordinator or the IniModifier for the configuration file of the plugin if it exists.
 - getEntryPointsById() : EntryPointConfigurator
 - getEntryPointsByType() : array<string|int, EntryPointConfigurator>
 - getEntryPointsList() : array<string|int, EntryPointConfigurator>
 - List of entry points of the application.
 - getMainEntryPoint() : EntryPointConfigurator
 - Main entrypoint of the application (in most of case, index.php).
 - getProfilesIni() : mixed
 - getSingleConfigIni() : IniModifierInterface|IniReaderInterface
 - main config or local config ini file alone.
 - removeDirectoryContent() : mixed
 - remove the whole content of a directory from the application.
 - removeEntryPoint() : mixed
 - Remove an entry point that was installed by a module
 - removeFile() : mixed
 - delete a file from the the application.
 - removeGlobalWebAssets() : mixed
 - remove web assets from the main configuration.
 - setupModuleWebFiles() : mixed
 - Install web files of a module.
 - updateEntryPointFile() : mixed
 - expandPath() : mixed
 - updateOrCreateEntryPointFile() : mixed
 
Properties
$globalSetup
global setup.
    protected
        GlobalSetup
    $globalSetup
    
    
    
    
$interactiveConfigurator
    protected
        InteractiveConfigurator
    $interactiveConfigurator
    
    
    
    
Methods
__construct()
    public
                __construct(GlobalSetup $setup, InteractiveConfigurator $cli) : mixed
        
        Parameters
- $setup : GlobalSetup
 - $cli : InteractiveConfigurator
 
Return values
mixed —cli()
    public
                cli() : InteractiveConfigurator
    
    
    
        Return values
InteractiveConfigurator —configFilePath()
Path to the configuration directory.
    public
                configFilePath([string $file = '' ]) : string
        It gives the path to app/system or local/config, depending on if the configuration is for the application or for the instance
Parameters
- $file : string = ''
 
Return values
string —the path
copyDirectoryContent()
copy the whole content of a directory existing in the install/ directory of the component, to the given directory.
    public
                copyDirectoryContent(string $relativeSourcePath, string $targetPath[, mixed $overwrite = false ]) : mixed
    
        Parameters
- $relativeSourcePath : string
 - 
                    
relative path to the install/ directory of the component
 - $targetPath : string
 - 
                    
the path where to copy the content. the path may content Jelix shortcuts, see FileHelpersTrait
 - $overwrite : mixed = false
 
Return values
mixed —copyFile()
copy a file from the install/ directory to an other.
    public
                copyFile(string $relativeSourcePath, string $targetPath[, mixed $overwrite = false ]) : mixed
    
        Parameters
- $relativeSourcePath : string
 - 
                    
relative path to the install/ directory of the file to copy
 - $targetPath : string
 - 
                    
the path where to copy the file. the path may content Jelix shortcuts, see FileHelpersTrait
 - $overwrite : mixed = false
 
Return values
mixed —createEntryPoint()
Create a new entry point.
    public
                createEntryPoint(string $entryPointModelFile, string $entryPointWebPath, string $configFileName[, string $epType = 'classic' ][, string $configFileModel = '' ]) : mixed
    
        Parameters
- $entryPointModelFile : string
 - 
                    
the entrypoint file to copy
 - $entryPointWebPath : string
 - 
                    
the path of the entrypoint to create into the www directory
 - $configFileName : string
 - 
                    
name of the configuration file. path relative to app/system or var/config
 - $epType : string = 'classic'
 - 
                    
type of the entry point (classic)
 - $configFileModel : string = ''
 - 
                    
a configuration file to copy as $configFileName. default is an empty content.
 
Tags
Return values
mixed —declareGlobalWebAssets()
declare web assets into the main configuration.
    public
                declareGlobalWebAssets(string $name, array<string|int, mixed> $values, string $collection, bool $force) : mixed
    
        Parameters
- $name : string
 - 
                    
the name of webassets
 - $values : array<string|int, mixed>
 - 
                    
should be an array with one or more of these keys 'css' (array), 'js' (array), 'require' (string)
 - $collection : string
 - 
                    
the name of the webassets collection
 - $force : bool
 
Return values
mixed —forLocalConfiguration()
    public
                forLocalConfiguration() : mixed
        
    
    
        Return values
mixed —getConfigIni()
default config, main config combined with or without local config.
    public
                getConfigIni() : IniModifierArray
    
    
    
        Return values
IniModifierArray —getCoordPluginConfig()
return the section name of configuration of a plugin for the coordinator or the IniModifier for the configuration file of the plugin if it exists.
    public
                getCoordPluginConfig(string $pluginName[, IniReaderInterface $config = null ]) : null|array<string|int, mixed>
    
        Parameters
- $pluginName : string
 - $config : IniReaderInterface = null
 - 
                    
the configuration file from which we should extract the plugin configuration. default is the full configuration.
 
Tags
Return values
null|array<string|int, mixed> —null if plugin is unknown, else array($iniModifier, $section)
getEntryPointsById()
    public
                getEntryPointsById( $epId) : EntryPointConfigurator
    
        Parameters
Return values
EntryPointConfigurator —getEntryPointsByType()
    public
                getEntryPointsByType([string $type = 'classic' ]) : array<string|int, EntryPointConfigurator>
    
        Parameters
- $type : string = 'classic'
 
Return values
array<string|int, EntryPointConfigurator> —getEntryPointsList()
List of entry points of the application.
    public
                getEntryPointsList() : array<string|int, EntryPointConfigurator>
    
    
    
        Return values
array<string|int, EntryPointConfigurator> —getMainEntryPoint()
Main entrypoint of the application (in most of case, index.php).
    public
                getMainEntryPoint() : EntryPointConfigurator
    
    
    
        Return values
EntryPointConfigurator —getProfilesIni()
    public
                getProfilesIni() : mixed
        
    
    
        Return values
mixed —getSingleConfigIni()
main config or local config ini file alone.
    public
                getSingleConfigIni() : IniModifierInterface|IniReaderInterface
    
    
    
        Return values
IniModifierInterface|IniReaderInterface —removeDirectoryContent()
remove the whole content of a directory from the application.
    public
                removeDirectoryContent(string $targetPath) : mixed
    
        Parameters
- $targetPath : string
 - 
                    
the path of the directory to remove the path may content Jelix shortcuts, see FileHelpersTrait
 
Return values
mixed —removeEntryPoint()
Remove an entry point that was installed by a module
    public
                removeEntryPoint(string $entryPointWebPath, string $configFileName[, string $epType = 'classic' ]) : mixed
    
        Parameters
- $entryPointWebPath : string
 - 
                    
the path of the entrypoint to create into the www directory
 - $configFileName : string
 - 
                    
name of the configuration file. path relative to app/system or var/config
 - $epType : string = 'classic'
 - 
                    
type of the entry point (classic)
 
Tags
Return values
mixed —removeFile()
delete a file from the the application.
    public
                removeFile(string $targetPath) : mixed
    
        Parameters
- $targetPath : string
 - 
                    
the path of the file the path may content Jelix shortcuts, see FileHelpersTrait
 
Return values
mixed —removeGlobalWebAssets()
remove web assets from the main configuration.
    public
                removeGlobalWebAssets(string $name, string $collection) : mixed
    
        Parameters
- $name : string
 - 
                    
the name of webassets
 - $collection : string
 - 
                    
the name of the webassets collection
 
Return values
mixed —setupModuleWebFiles()
Install web files of a module.
    public
                setupModuleWebFiles(string $wwwFilesMode, string $wwwDirectoryName, string $sourcePath) : mixed
        It supports different way to install : copying files, creating a symbolic link or do nothing (aka you should create an alias nto the vhost of the web server)
Parameters
- $wwwFilesMode : string
 - 
                    
should be 'copy' or '' (files will be copied), 'symlink' (a sym link is created) or any other value (do nothing/remove copied files)
 - $wwwDirectoryName : string
 - 
                    
the path inside the www path
 - $sourcePath : string
 - 
                    
the path of the directory
 
Tags
Return values
mixed —updateEntryPointFile()
    public
                updateEntryPointFile(string $entryPointModelFile, mixed $entryPointWebPath[, mixed $epType = 'classic' ]) : mixed
    
        Parameters
- $entryPointModelFile : string
 - 
                    
path to the entrypoint file to copy, from the install directory
 - $entryPointWebPath : mixed
 - $epType : mixed = 'classic'
 
Return values
mixed —expandPath()
    protected
                expandPath(mixed $path) : mixed
        
        Parameters
- $path : mixed
 
Return values
mixed —updateOrCreateEntryPointFile()
    protected
                updateOrCreateEntryPointFile(mixed $entryPointFile, mixed $epPath) : mixed
        
        Parameters
- $entryPointFile : mixed
 - $epPath : mixed
 
