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() | |
| user_feAdmin::init | ( | $ | content, | |
| $ | conf | |||
| ) |
Main function. Called from TypoScript. This
| string | Empty string, ignore. | |
| array | TypoScript properties following the USER_INT object which uses this library |
| 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
| 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.
| 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. |
| user_feAdmin::overrideValues | ( | ) |
Overriding values in $this->dataArr if configured for that in TypoScript ([edit/create].overrideValues)
| user_feAdmin::defaultValues | ( | ) |
Called if there is no input array in $this->dataArr. Then this function sets the default values configured in TypoScript
| 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
| 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.
| 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 |
| user_feAdmin::userProcess_alt | ( | $ | confVal, | |
| $ | confArr, | |||
| $ | passVar | |||
| ) |
User processing of contnet
| 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 |
| user_feAdmin::save | ( | ) |
| 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)
| user_feAdmin::deleteFilesFromRecord | ( | $ | uid | ) |
Deletes the files attached to a record and updates the record. Table/uid is $this->theTable/$uid
| integer | Uid number of the record to delete from $this->theTable |
| user_feAdmin::displayDeleteScreen | ( | ) |
| user_feAdmin::displayCreateScreen | ( | ) |
| user_feAdmin::displayEditScreen | ( | ) |
| 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()
| array | The array with the record to edit |
| 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.
| 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.
| string | The template HTML code | |
| string | Comma list of fields which has errors (and therefore should not be removed) |
| user_feAdmin::getPlainTemplate | ( | $ | key, | |
| $ | r = '' | |||
| ) |
Returns template subpart HTML code for the key given
| 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 |
| user_feAdmin::modifyDataArrForFormUpdate | ( | $ | inputArr | ) |
Modifies input array for passing on to tslib_cObj::getUpdateJS() which produces some JavaScript for form evaluation or the like.
| array | The data array |
| 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.
| 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. |
| user_feAdmin::sendInfoMail | ( | ) |
Sends info mail to user
| 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.
| 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 |
| user_feAdmin::sendMail | ( | $ | recipient, | |
| $ | admin, | |||
| $ | content = '', |
|||
| $ | adminContent = '' | |||
| ) |
Actually sends the requested mails (through $this->cObj->sendNotifyEmail)
| 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 |
| user_feAdmin::isHTMLContent | ( | $ | c | ) |
Detects if content is HTML (looking for <html> tag as first and last in string)
| string | Content string to test |
| 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.
| 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. |
| 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');"
| array | The data array for which to evaluate authentication |
| user_feAdmin::authCode | ( | $ | r, | |
| $ | extra = '' | |||
| ) |
Creating authentication hash string based on input record and the fields listed in TypoScript property "authcodeFields"
| array | The data record | |
| string | Additional string to include in the hash |
| user_feAdmin::setfixed | ( | $ | markerArray, | |
| $ | setfixed, | |||
| $ | r | |||
| ) |
Adding keys to the marker array with "setfixed" GET parameters
| 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 |
| user_feAdmin::setfixedHash | ( | $ | recCopy, | |
| $ | fields = '' | |||
| ) |
Creating hash string for setFixed. Much similar to authCode()
| array | The data record | |
| string | List of fields to use |
| user_feAdmin::isPreview | ( | ) |
Returns true if preview display is on.
| user_feAdmin::createFileFuncObj | ( | ) |
Creates an instance of class "t3lib_basicFileFunctions" in $this->fileFunc (if not already done)
| user_feAdmin::clearCacheIfSet | ( | ) |
If TypoScript property clearCacheOfPages is set then all page ids in this value will have their cache cleared
| 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
| string | Field name | |
| string | Command identifier string | |
| string | Alternative label, shown if no other error string was found |
| 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() |
1.5.3