TYPO3 API  SVNRelease
Public Member Functions | Public Attributes
t3lib_modSettings Class Reference

List of all members.

Public Member Functions

 init ($prefix= '', $storeList= '')
 setSessionType ($type= 'ses')
 setStoreList ($storeList)
 addToStoreList ($storeList)
 addToStoreListFromPrefix ($prefix= '')
 initStorage ()
 cleanupStorageArray ($storedSettings)
 compileEntry ($data)
 getStoredData ($storeIndex, $writeArray=array())
 processStoreControl ($mconfName= '')
 writeStoredSetting ($writeArray=array(), $mconfName= '')
 getStoreControl ($showElements= 'load, remove, save', $useOwnForm=TRUE)
 processEntry ($storageArr)

Public Attributes

 $type = 'perm'
 $prefix = ''
 $storeList = array()
 $storedSettings = array()
 $msg = ''
 $formName = 'storeControl'
 $writeDevLog = 0

Detailed Description

Definition at line 123 of file class.t3lib_modsettings.php.


Member Function Documentation

t3lib_modSettings::addToStoreList ( storeList)

Add MOD_SETTINGS keys to the current list

Parameters:
mixedarray or string (,) - add names of keys of the MOD_SETTING array which should be stored
Returns:
void

Definition at line 228 of file class.t3lib_modsettings.php.

References $storeList, t3lib_div\devLog(), and t3lib_div\trimExplode().

t3lib_modSettings::addToStoreListFromPrefix ( prefix = '')

Add names of keys of the MOD_SETTING array by a prefix

Parameters:
stringprefix of MOD_SETTING array keys that should be stored
Returns:
void

Definition at line 244 of file class.t3lib_modsettings.php.

References $prefix, $SOBE, $value, and t3lib_div\devLog().

t3lib_modSettings::cleanupStorageArray ( storedSettings)

Remove corrupted data entries from the stored settings array

Parameters:
array$storedSettings
Returns:
array $storedSettings

Definition at line 289 of file class.t3lib_modsettings.php.

References $storedSettings.

Referenced by initStorage(), and writeStoredSetting().

t3lib_modSettings::compileEntry ( data)

Creates an entry for the stored settings array Collects data from MOD_SETTINGS selected by the storeList

Parameters:
arrayShould work with data from _GP('storeControl'). This is ['title']: Title for the entry. ['desc']: A description text. Currently not used by this class
Returns:
array $storageArr: entry for the stored settings array

Definition at line 317 of file class.t3lib_modsettings.php.

References $GLOBALS, $SOBE, and processEntry().

Referenced by processStoreControl().

t3lib_modSettings::getStoreControl ( showElements = 'load,
remove  ,
save'  ,
useOwnForm = TRUE 
)

Returns the storage control box

Parameters:
stringList of elemetns which should be shown: load,remove,save
booleanIf set the box is wrapped with own form tag
Returns:
string HTML code

Definition at line 473 of file class.t3lib_modsettings.php.

References $TYPO3_CONF_VARS, t3lib_div\getIndpEnv(), initStorage(), and t3lib_div\trimExplode().

t3lib_modSettings::getStoredData ( storeIndex,
writeArray = array() 
)

Copies the stored data from entry $index to $writeArray which can be used to set MOD_SETTINGS

Parameters:
mixedThe entry key
arrayPreset data array. Will be overwritten by copied values.
Returns:
array Data array

Definition at line 344 of file class.t3lib_modsettings.php.

Referenced by processStoreControl().

t3lib_modSettings::init ( prefix = '',
storeList = '' 
)

Initializes the object

Parameters:
stringPrefix of MOD_SETTING array keys that should be stored
arrayadditional names of keys of the MOD_SETTING array which should be stored (array or comma list)
Returns:
void

Definition at line 175 of file class.t3lib_modsettings.php.

References $GLOBALS, $prefix, $storeList, and setStoreList().

t3lib_modSettings::initStorage ( )

Get the stored settings from MOD_SETTINGS and set them in $this->storedSettings

Returns:
void

Definition at line 275 of file class.t3lib_modsettings.php.

References $SOBE, $storedSettings, and cleanupStorageArray().

Referenced by getStoreControl(), and processStoreControl().

t3lib_modSettings::processEntry ( storageArr)

Processing entry for the stored settings array Can be overwritten by extended class

Parameters:
array$storageData,:entry for the stored settings array
Returns:
array $storageData: entry for the stored settings array

Definition at line 572 of file class.t3lib_modsettings.php.

Referenced by compileEntry().

t3lib_modSettings::processStoreControl ( mconfName = '')

Processing of the storage command LOAD, SAVE, REMOVE

Parameters:
stringName of the module to store the settings for. Default: $GLOBALS['SOBE']->MCONF['name'] (current module)
Returns:
string Storage message. Also set in $this->msg

Definition at line 360 of file class.t3lib_modsettings.php.

References $msg, t3lib_div\_GP(), t3lib_div\arrayToLogString(), compileEntry(), t3lib_div\devLog(), getStoredData(), initStorage(), t3lib_div\shortMD5(), and writeStoredSetting().

t3lib_modSettings::setSessionType ( type = 'ses')

Set session type to 'ses' which will store the settings data not permanently.

Parameters:
stringDefault is 'ses'
Returns:
void

Definition at line 195 of file class.t3lib_modsettings.php.

References $type.

t3lib_modSettings::setStoreList ( storeList)

Set MOD_SETTINGS keys which should be stored

Parameters:
mixedarray or string (,) - set additional names of keys of the MOD_SETTING array which should be stored
Returns:
void

Definition at line 213 of file class.t3lib_modsettings.php.

References $storeList, t3lib_div\devLog(), and t3lib_div\trimExplode().

Referenced by init().

t3lib_modSettings::writeStoredSetting ( writeArray = array(),
mconfName = '' 
)

Write the current storage array and update MOD_SETTINGS

Parameters:
arrayArray of settings which should be overwrite current MOD_SETTINGS
stringName of the module to store the settings for. Default: $GLOBALS['SOBE']->MCONF['name'] (current module)
Returns:
void

Definition at line 441 of file class.t3lib_modsettings.php.

References $SOBE, cleanupStorageArray(), t3lib_div\devLog(), and t3lib_BEfunc\getModuleData().

Referenced by processStoreControl().


Member Data Documentation

t3lib_modSettings::$formName = 'storeControl'

Name of the form. Needed for JS

Definition at line 155 of file class.t3lib_modsettings.php.

t3lib_modSettings::$msg = ''

Message from the last storage command

Definition at line 149 of file class.t3lib_modsettings.php.

Referenced by processStoreControl().

t3lib_modSettings::$prefix = ''

prefix of MOD_SETTING array keys that should be stored

Definition at line 134 of file class.t3lib_modsettings.php.

Referenced by addToStoreListFromPrefix(), and init().

t3lib_modSettings::$storedSettings = array()

The stored settings array

Definition at line 144 of file class.t3lib_modsettings.php.

Referenced by cleanupStorageArray(), and initStorage().

t3lib_modSettings::$storeList = array()

Names of keys of the MOD_SETTING array which should be stored

Definition at line 139 of file class.t3lib_modsettings.php.

Referenced by addToStoreList(), init(), and setStoreList().

t3lib_modSettings::$type = 'perm'

If type is set 'ses' then the module data will be stored into the session and will be lost with logout. Type 'perm' will store the data permanently.

Definition at line 129 of file class.t3lib_modsettings.php.

Referenced by setSessionType().

t3lib_modSettings::$writeDevLog = 0

Definition at line 158 of file class.t3lib_modsettings.php.


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