wCMF  3.6
 All Classes Namespaces Files Functions Variables Groups Pages
ConfigController Class Reference
+ Inheritance diagram for ConfigController:

Public Member Functions

 initialize (&$request, &$response)
 
 validate ()
 
 hasView ()
 
 executeKernel ()
 
 getKeyFromControlName ($controlname)
 
 makeControlNameFromKey ($key)
 
 renameControlNames ($key, $value)
 
- Public Member Functions inherited from Controller
 Controller (&$delegate)
 
 initialize (&$request, &$response)
 
 validate ()
 
 hasView ()
 
 execute ()
 
 executeKernel ()
 
 getErrorMsg ()
 
 setErrorMsg ($msg)
 
 appendErrorMsg ($msg)
 
getRequest ()
 
getResponse ()
 
getView ()
 
getDelegate ()
 
 getViewTemplate ($controller, $context, $action)
 
 getCacheId ()
 
 assignViewDefaults (&$view)
 
 isLocalizedRequest ()
 

Additional Inherited Members

- Public Attributes inherited from Controller
 $_request = null
 
 $_response = null
 
 $_errorMsg = ''
 
 $_view = null
 
 $_delegate = null
 

Detailed Description

ConfigController is used to edit configuration files. The controller uses the global variable CONFIG_PATH to locate the configuration files. The global variables CONFIG_EXTENSION and MAIN_CONFIG_FILE are used to determine which files are configuration files and which one is the default one.

wCMF - wemove Content Management Framework Copyright (C) 2005-2014 wemove digital solutions GmbH

Licensed under the terms of any of the following licenses at your choice:

See the license.txt file distributed with this work for additional information.

Id:
class.ConfigController.php 1462 2014-02-04 23:52:27Z iherwig

Input actions:

  • newconfig Create a new configuration file
  • editconfig Edit a configuration file
  • save Save changes to the current configuration file
  • delconfig Delete a configuration file
  • newsection Create a new section in the current configuration file
  • delsection Delete a section from the current configuration file
  • newoption Create a new option in the current configuration file
  • deloption Delete an option in the current configuration file

Output actions:

  • ok In any case
Parameters
[in,out]oidThe name of the currrent configuration file
[in]poidThe name of the currrent configuration section
[in]type_section_section_<sectionname>A list of variables defining the section names
[in]type_option_section_<sectionname>_option_<optionname>A list of variables defining the option names
[in]type_value_section_<sectionname>_option_<optionname>A list of variables defining the option values
[in]deleteoidsThe names of the configuration files to delete (comma separated list)
[out]configfileA reference to an InifileParser instance representing the current configuration file
[out]ismainconfigfileTrue/False wether the current configuration file is the MAIN_CONFIG_FILE
[out]configFilenameNoExtensionThe name of the currrent configuration file without CONFIG_EXTENSION
[out]internallinkAn internal link that the view can use to position the window at the field to edit
Author
ingo herwig ingo@.nosp@m.wemo.nosp@m.ve.co.nosp@m.m

Definition at line 60 of file class.ConfigController.php.

Member Function Documentation

ConfigController::initialize ( $request,
$response 
)
See Also
Controller::initialize()

Definition at line 65 of file class.ConfigController.php.

ConfigController::validate ( )
See Also
Controller::validate()

Definition at line 78 of file class.ConfigController.php.

References Controller\setErrorMsg().

+ Here is the call graph for this function:

ConfigController::hasView ( )
See Also
Controller::hasView()

Definition at line 101 of file class.ConfigController.php.

ConfigController::executeKernel ( )

Process action and assign data to View.

Returns
Array of given context and action 'ok' on delete. False else (Stop action processing chain).
See Also
Controller::executeKernel()

Definition at line 114 of file class.ConfigController.php.

References Controller\appendErrorMsg(), Message\get(), PersistenceFacade\getInstance(), getKeyFromControlName(), and renameControlNames().

+ Here is the call graph for this function:

ConfigController::getKeyFromControlName (   $controlname)

Extract the parameters for locating a value in a configuration file (type, section, key).

Parameters
controlnameA string of the from 'type_typeName_section_sectionName_option_optionName'
Returns
An assoziative array with the keys 'type', 'section', 'option', where type typically has one of the values 'section', 'option', 'value'

Definition at line 282 of file class.ConfigController.php.

Referenced by executeKernel(), and renameControlNames().

ConfigController::makeControlNameFromKey (   $key)

Extract the parameters for locating a value in a configuration file (type, section, key).

Parameters
keyAn assoziative array as provided by getKeyFromControlName() describing the entry
Returns
A string of the from 'type_typeName_section_sectionName_option_optionName'

Definition at line 292 of file class.ConfigController.php.

Referenced by renameControlNames().

ConfigController::renameControlNames (   $key,
  $value 
)

Rename all control names in $this->_request->getData().

Parameters
keyAn assoziative array as provided by getKeyFromControlName() describing the entry that has changed
valueThe new value of the entry to construct the control name from

Definition at line 304 of file class.ConfigController.php.

References getKeyFromControlName(), ArrayUtil\key_array_rename(), and makeControlNameFromKey().

Referenced by executeKernel().

+ Here is the call graph for this function:


The documentation for this class was generated from the following file: