TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
ConfigurationUtility Class Reference
Inheritance diagram for ConfigurationUtility:
SingletonInterface

Public Member Functions

 injectObjectManager (\TYPO3\CMS\Extbase\Object\ObjectManager $objectManager)
 
 saveDefaultConfiguration ($extensionKey)
 
 getCurrentConfiguration ($extensionKey)
 
 convertValuedToNestedConfiguration (array $valuedConfiguration)
 
 convertNestedToValuedConfiguration (array $nestedConfiguration)
 

Protected Member Functions

 getDefaultConfigurationRawString ($extensionKey)
 

Protected Attributes

 $objectManager
 

Detailed Description

Utility for dealing with ext_emconf and ext_conf_template settings

Definition at line 22 of file ConfigurationUtility.php.

Member Function Documentation

convertNestedToValuedConfiguration ( array  $nestedConfiguration)

Convert a nested configuration to a valued configuration

array('first.' => array('second' => 1)) will become array('first.second' => array('value' => 1)

Parameters
array$nestedConfiguration
Returns
array

Definition at line 209 of file ConfigurationUtility.php.

References ArrayUtility\flatten().

Referenced by ConfigurationUtility\getCurrentConfiguration().

convertValuedToNestedConfiguration ( array  $valuedConfiguration)

Converts a valued configuration to a nested configuration.

array('first.second' => array('value' => 1)) will become array('first.' => array('second' => ))

Parameters
array$valuedConfiguration
Returns
array

Definition at line 190 of file ConfigurationUtility.php.

References ArrayUtility\setValueByPath().

Referenced by ConfigurationUtility\saveDefaultConfiguration().

getCurrentConfiguration (   $extensionKey)

Get current configuration of an extension. Will return the configuration as a valued object

Parameters
string$extensionKey
Returns
array

Definition at line 79 of file ConfigurationUtility.php.

References $GLOBALS, ConfigurationUtility\convertNestedToValuedConfiguration(), and ArrayUtility\mergeRecursiveWithOverrule().

Referenced by ConfigurationUtility\saveDefaultConfiguration().

getDefaultConfigurationRawString (   $extensionKey)
protected

Return content of an extensions ext_conf_template.txt file if the file exists, empty string if file does not exist.

Parameters
string$extensionKeyExtension key
Returns
string

Definition at line 168 of file ConfigurationUtility.php.

References GeneralUtility\getFileAbsFileName().

injectObjectManager ( \TYPO3\CMS\Extbase\Object\ObjectManager  $objectManager)
Parameters
\TYPO3\CMS\Extbase\Object\ObjectManager$objectManager

Definition at line 32 of file ConfigurationUtility.php.

References ConfigurationUtility\$objectManager.

saveDefaultConfiguration (   $extensionKey)

Get default configuration from ext_conf_template of an extension and save as initial configuration to LocalConfiguration ['EXT']['extConf'].

Used by the InstallUtility to initialize local extension config.

Parameters
string$extensionKeyExtension key
Returns
void

Definition at line 46 of file ConfigurationUtility.php.

References ConfigurationUtility\convertValuedToNestedConfiguration(), and ConfigurationUtility\getCurrentConfiguration().

Member Data Documentation

$objectManager
protected

Definition at line 27 of file ConfigurationUtility.php.

Referenced by ConfigurationUtility\injectObjectManager().