Solutions Open Source

Référence de la classe user_feAdmin

Liste de tous les membres

Fonctions membres publiques

 init ($content, $conf)
 parseValues ()
 processFiles ($cmdParts, $theField)
 overrideValues ()
 defaultValues ()
 evalValues ()
 userProcess ($mConfKey, $passVar)
 userProcess_alt ($confVal, $confArr, $passVar)
 save ()
 deleteRecord ()
 deleteFilesFromRecord ($uid)
 displayDeleteScreen ()
 displayCreateScreen ()
 displayEditScreen ()
 displayEditForm ($origArr)
 procesSetFixed ()
 removeRequired ($templateCode, $failure)
 getPlainTemplate ($key, $r='')
 modifyDataArrForFormUpdate ($inputArr)
 setCObjects ($templateCode, $currentArr=array(), $markerArray='', $specialPrefix='')
 sendInfoMail ()
 compileMail ($key, $DBrows, $recipient, $setFixedConfig=array())
 sendMail ($recipient, $admin, $content='', $adminContent='')
 isHTMLContent ($c)
 sendHTMLMail ($content, $recipient, $dummy, $fromEmail, $fromName, $replyTo='')
 aCAuth ($r)
 authCode ($r, $extra='')
 setfixed ($markerArray, $setfixed, $r)
 setfixedHash ($recCopy, $fields='')
 isPreview ()
 createFileFuncObj ()
 clearCacheIfSet ()
 getFailure ($theField, $theCmd, $label)

Attributs publics

 $recInMarkersHSC = TRUE
 $dataArr = array()
 $failureMsg = array()
 $theTable = ''
 $thePid = 0
 $markerArray = array()
 $templateCode = ''
 $cObj
 $cmd
 $preview
 $backURL
 $recUid
 $failure = 0
 $error = ''
 $saved = 0
 $requiredArr
 $currentArr = array()
 $previewLabel = ''
 $nc = ''
 $additionalUpdateFields = ''
 $emailMarkPrefix = 'EMAIL_TEMPLATE_'
 $codeLength
 $cmdKey
 $fileFunc = ''
 $filesStoredInUploadFolders = array()
 $unlinkTempFiles = array()


Documentation des fonctions membres

user_feAdmin::init ( content,
conf 
)

Main function. Called from TypoScript. This

Paramètres:
string Empty string, ignore.
array TypoScript properties following the USER_INT object which uses this library
Renvoie:
string HTML content &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=396&cHash=d267c36546

user_feAdmin::parseValues (  ) 

Performs processing on the values found in the input data array, $this->dataArr. The processing is done according to configuration found in TypoScript Examples of this could be to force a value to an integer, remove all non-alphanumeric characters, trimming a value, upper/lowercase it, or process it due to special types like files submitted etc. Called from init() if the $this->dataArr is found to be an array

Renvoie:
void
Voir également:
init()

user_feAdmin::processFiles ( cmdParts,
theField 
)

Processing of files. NOTICE: for now files can be handled only on creation of records. But a more advanced feature is that PREVIEW of files is handled.

Paramètres:
array Array with cmd-parts (from parseValues()). This will for example contain information about allowed file extensions and max size of uploaded files.
string The fieldname with the files.
Renvoie:
void private
Voir également:
parseValues()

user_feAdmin::overrideValues (  ) 

Overriding values in $this->dataArr if configured for that in TypoScript ([edit/create].overrideValues)

Renvoie:
void
Voir également:
init()

user_feAdmin::defaultValues (  ) 

Called if there is no input array in $this->dataArr. Then this function sets the default values configured in TypoScript

Renvoie:
void
Voir également:
init()

user_feAdmin::evalValues (  ) 

This will evaluate the input values from $this->dataArr to see if they conforms with the requirements configured in TypoScript per field. For example this could be checking if a field contains a valid email address, a unique value, a value within a certain range etc. It will populate arrays like $this->failure and $this->failureMsg with error messages (which can later be displayed in the template). Mostly it does NOT alter $this->dataArr (such parsing of values was done by parseValues()) Works based on configuration in TypoScript key [create/edit].evalValues

Renvoie:
void
Voir également:
init(), parseValues()

user_feAdmin::userProcess ( mConfKey,
passVar 
)

Preforms user processing of input array - triggered right after the function call to evalValues() IF TypoScript property "evalFunc" was set.

Paramètres:
string Key pointing to the property in TypoScript holding the configuration for this processing (here: "evalFunc.*"). Well: at least its safe to say that "parentObj" in this array passed to the function is a reference back to this object.
array The $this->dataArr passed for processing
Renvoie:
array The processed $passVar ($this->dataArr)
Voir également:
init(), evalValues()

user_feAdmin::userProcess_alt ( confVal,
confArr,
passVar 
)

User processing of contnet

Paramètres:
string Value of the TypoScript object triggering the processing.
array Properties of the TypoScript object triggering the processing. The key "parentObj" in this array is passed to the function as a reference back to this object.
mixed Input variable to process
Renvoie:
mixed Processed input variable, $passVar
Voir également:
userProcess(), save(), modifyDataArrForFormUpdate()

user_feAdmin::save (  ) 

Performs the saving of records, either edited or created.

Renvoie:
void
Voir également:
init()

user_feAdmin::deleteRecord (  ) 

Deletes the record from table/uid, $this->theTable/$this->recUid, IF the fe-user has permission to do so. If the deleted flag should just be set, then it is done so. Otherwise the record truely is deleted along with any attached files. Called from init() if "cmd" was set to "delete" (and some other conditions)

Renvoie:
string void
Voir également:
init()

user_feAdmin::deleteFilesFromRecord ( uid  ) 

Deletes the files attached to a record and updates the record. Table/uid is $this->theTable/$uid

Paramètres:
integer Uid number of the record to delete from $this->theTable
Renvoie:
void private
Voir également:
deleteRecord()

user_feAdmin::displayDeleteScreen (  ) 

Creates the preview display of delete actions

Renvoie:
string HTML content
Voir également:
init()

user_feAdmin::displayCreateScreen (  ) 

Creates the "create" screen for records

Renvoie:
string HTML content
Voir également:
init()

user_feAdmin::displayEditScreen (  ) 

Creates the edit-screen for records

Renvoie:
string HTML content
Voir également:
init()

user_feAdmin::displayEditForm ( origArr  ) 

Subfunction for displayEditScreen(); Takes a record and creates an edit form based on the template code for it. This function is called if the user is editing a record and permitted to do so. Checked in displayEditScreen()

Paramètres:
array The array with the record to edit
Renvoie:
string HTML content private
Voir également:
displayEditScreen()

user_feAdmin::procesSetFixed (  ) 

Processes socalled "setfixed" commands. These are commands setting a certain field in a certain record to a certain value. Like a link you can click in an email which will unhide a record to enable something. Or likewise a link which can delete a record by a single click. The idea is that only some allowed actions like this is allowed depending on the configured TypoScript.

Renvoie:
string HTML content displaying the status of the action

user_feAdmin::removeRequired ( templateCode,
failure 
)

Remove required parts from template code string Works like this:

Only fields that are found in $this->requiredArr is processed.

Paramètres:
string The template HTML code
string Comma list of fields which has errors (and therefore should not be removed)
Renvoie:
string The processed template HTML code

user_feAdmin::getPlainTemplate ( key,
r = '' 
)

Returns template subpart HTML code for the key given

Paramètres:
string Subpart marker to return subpart for.
array Optional data record array. If set, then all fields herein will also be substituted if found as markers in the template
Renvoie:
string The subpart with all markers found in current $this->markerArray substituted.
Voir également:
tslib_cObj::fillInMarkerArray()

user_feAdmin::modifyDataArrForFormUpdate ( inputArr  ) 

Modifies input array for passing on to tslib_cObj::getUpdateJS() which produces some JavaScript for form evaluation or the like.

Paramètres:
array The data array
Renvoie:
array The processed input array
Voir également:
displayCreateScreen(), displayEditForm(), tslib_cObj::getUpdateJS()

user_feAdmin::setCObjects ( templateCode,
currentArr = array(),
markerArray = '',
specialPrefix = '' 
)

Will render TypoScript cObjects (configured in $this->conf['cObjects.']) and add their content to keys in a markerArray, either the array passed to the function or the internal one ($this->markerArray) if the input $markerArray is not set.

Paramètres:
string The current template code string. Is used to check if the marker string is found and if not, the content object is not rendered!
array An alternative data record array (if empty then $this->dataArr is used)
mixed An alternative markerArray to fill in (instead of $this->markerArray). If you want to set the cobjects in the internal $this->markerArray, then just set this to non-array value.
string Optional prefix to set for the marker strings.
Renvoie:
array The processed $markerArray (if given).

user_feAdmin::sendInfoMail (  ) 

Sends info mail to user

Renvoie:
string HTML content message
Voir également:
init(),compileMail(), sendMail()

user_feAdmin::compileMail ( key,
DBrows,
recipient,
setFixedConfig = array() 
)

Compiles and sends a mail based on input values + template parts. Looks for a normal and an "-admin" template and may send both kinds of emails. See documentation in TSref.

Paramètres:
string A key which together with $this->emailMarkPrefix will identify the part from the template code to use for the email.
array An array of records which fields are substituted in the templates
mixed Mail recipient. If string then its supposed to be an email address. If integer then its a uid of a fe_users record which is looked up and the email address from here is used for sending the mail.
array Additional fields to set in the markerArray used in the substitution process
Renvoie:
void

user_feAdmin::sendMail ( recipient,
admin,
content = '',
adminContent = '' 
)

Actually sends the requested mails (through $this->cObj->sendNotifyEmail)

Paramètres:
string Recipient email address (or list)
string Possible "admin" email address. Will enable sending of admin emails if also $adminContent is provided
string Content for the regular email to user
string Content for the admin email to administrator
Renvoie:
void private
Voir également:
compileMail(), sendInfoMail()

user_feAdmin::isHTMLContent ( c  ) 

Detects if content is HTML (looking for <html> tag as first and last in string)

Paramètres:
string Content string to test
Renvoie:
boolean Returns true if the content begins and ends with <html></html>-tags

user_feAdmin::sendHTMLMail ( content,
recipient,
dummy,
fromEmail,
fromName,
replyTo = '' 
)

Sending HTML email, using same parameters as tslib_cObj::sendNotifyEmail() NOTICE: "t3lib_htmlmail" library must be included for this to work, otherwise an error message is outputted.

Paramètres:
string The message content. If blank, no email is sent.
string Comma list of recipient email addresses
string IGNORE this parameter
string "From" email address
string Optional "From" name
string Optional "Reply-To" header email address.
Renvoie:
void private
Voir également:
sendMail(), tslib_cObj::sendNotifyEmail()

user_feAdmin::aCAuth ( r  ) 

Returns true if authentication is OK based on the "aC" code which is a GET parameter set from outside with a hash string which must match some internal hash string. This allows to authenticate editing without having a fe_users login Uses $this->authCode which is set in init() by "t3lib_div::_GP('aC');"

Paramètres:
array The data array for which to evaluate authentication
Renvoie:
boolean True if authenticated OK
Voir également:
authCode(), init()

user_feAdmin::authCode ( r,
extra = '' 
)

Creating authentication hash string based on input record and the fields listed in TypoScript property "authcodeFields"

Paramètres:
array The data record
string Additional string to include in the hash
Renvoie:
string Hash string of $this->codeLength (if TypoScript "authcodeFields" was set)
Voir également:
aCAuth()

user_feAdmin::setfixed ( markerArray,
setfixed,
r 
)

Adding keys to the marker array with "setfixed" GET parameters

Paramètres:
array Marker-array to modify/add a key to.
array TypoScript properties configuring "setfixed" for the plugin. Basically this is $this->conf['setfixed.'] passed along.
array The data record
Renvoie:
array Processed $markerArray
Voir également:
compileMail()

user_feAdmin::setfixedHash ( recCopy,
fields = '' 
)

Creating hash string for setFixed. Much similar to authCode()

Paramètres:
array The data record
string List of fields to use
Renvoie:
string Hash string of $this->codeLength (if TypoScript "authcodeFields" was set)
Voir également:
setfixed(),authCode()

user_feAdmin::isPreview (  ) 

Returns true if preview display is on.

Renvoie:
boolean

user_feAdmin::createFileFuncObj (  ) 

Creates an instance of class "t3lib_basicFileFunctions" in $this->fileFunc (if not already done)

Renvoie:
void

user_feAdmin::clearCacheIfSet (  ) 

If TypoScript property clearCacheOfPages is set then all page ids in this value will have their cache cleared

Renvoie:
void

user_feAdmin::getFailure ( theField,
theCmd,
label 
)

Returns an error message for the field/command combination inputted. The error message is looked up in the TypoScript properties (evalErrors.[fieldname].[command]) and if empty then the $label value is returned

Paramètres:
string Field name
string Command identifier string
string Alternative label, shown if no other error string was found
Renvoie:
string The error message string


Documentation des données membres

user_feAdmin::$recInMarkersHSC = TRUE

user_feAdmin::$dataArr = array()

user_feAdmin::$failureMsg = array()

user_feAdmin::$theTable = ''

user_feAdmin::$thePid = 0

user_feAdmin::$markerArray = array()

user_feAdmin::$templateCode = ''

user_feAdmin::$cObj

user_feAdmin::$cmd

user_feAdmin::$preview

user_feAdmin::$backURL

user_feAdmin::$recUid

user_feAdmin::$failure = 0

user_feAdmin::$error = ''

user_feAdmin::$saved = 0

user_feAdmin::$requiredArr

user_feAdmin::$currentArr = array()

user_feAdmin::$previewLabel = ''

user_feAdmin::$nc = ''

user_feAdmin::$additionalUpdateFields = ''

user_feAdmin::$emailMarkPrefix = 'EMAIL_TEMPLATE_'

user_feAdmin::$codeLength

user_feAdmin::$cmdKey

user_feAdmin::$fileFunc = ''

user_feAdmin::$filesStoredInUploadFolders = array()

user_feAdmin::$unlinkTempFiles = array()


La documentation de cette classe a été générée à partir du fichier suivant :
Généré le Fri Aug 31 11:44:20 2007 pour OBLADY - Typo3 API v4.1.2 par  doxygen 1.5.3