Commit b331c952 authored by Carsten  Rose's avatar Carsten Rose
Browse files

Update function headers.

parent de377b07
...@@ -281,6 +281,8 @@ abstract class AbstractBuildForm { ...@@ -281,6 +281,8 @@ abstract class AbstractBuildForm {
} }
/** /**
* Return a uniq form id
*
* @return string * @return string
*/ */
public function getFormId() { public function getFormId() {
...@@ -467,6 +469,8 @@ abstract class AbstractBuildForm { ...@@ -467,6 +469,8 @@ abstract class AbstractBuildForm {
} }
/** /**
* Create an array with standard elements and add 'form-element', 'value'.
*
* @param $htmlFormElementId * @param $htmlFormElementId
* @param string|array $value * @param string|array $value
* @param string $feMode disabled|readonly|'' * @param string $feMode disabled|readonly|''
...@@ -497,6 +501,8 @@ abstract class AbstractBuildForm { ...@@ -497,6 +501,8 @@ abstract class AbstractBuildForm {
} }
/** /**
* Depending of $feMode set variables $hidden, $disabled, $required to 'yes' or 'no'.
*
* @param $feMode * @param $feMode
* @param $hidden * @param $hidden
* @param $disabled * @param $disabled
...@@ -648,6 +654,8 @@ abstract class AbstractBuildForm { ...@@ -648,6 +654,8 @@ abstract class AbstractBuildForm {
} }
/** /**
* Calculates the maxlength of an input field, based on formElement type, formElement user definition and table.field definition.
*
* @param array $formElement * @param array $formElement
*/ */
private function adjustMaxLength(array &$formElement) { private function adjustMaxLength(array &$formElement) {
...@@ -848,6 +856,8 @@ abstract class AbstractBuildForm { ...@@ -848,6 +856,8 @@ abstract class AbstractBuildForm {
} }
/** /**
* Build HelpBlock
*
* @return string * @return string
*/ */
private function getHelpBlock() { private function getHelpBlock() {
...@@ -2030,6 +2040,8 @@ abstract class AbstractBuildForm { ...@@ -2030,6 +2040,8 @@ abstract class AbstractBuildForm {
} }
/** /**
* Parse $formElement[FE_EDITOR_*] settings and build editor settings.
*
* @param array $formElement * @param array $formElement
* @param $htmlFormElementId * @param $htmlFormElementId
* @return array * @return array
...@@ -2207,6 +2219,8 @@ abstract class AbstractBuildForm { ...@@ -2207,6 +2219,8 @@ abstract class AbstractBuildForm {
} }
/** /**
* Create a delete link.
*
* @param $table * @param $table
* @param $recordId * @param $recordId
* @param $symbol * @param $symbol
......
...@@ -153,6 +153,7 @@ const ERROR_UNKNOWN_ESCAPE_MODE = 1068; ...@@ -153,6 +153,7 @@ const ERROR_UNKNOWN_ESCAPE_MODE = 1068;
const ERROR_MISSING_CONFIG_INI_VALUE = 1069; const ERROR_MISSING_CONFIG_INI_VALUE = 1069;
const ERROR_SENDMAIL = 1070; const ERROR_SENDMAIL = 1070;
const ERROR_SENDMAIL_MISSING_VALUE = 1071; const ERROR_SENDMAIL_MISSING_VALUE = 1071;
const ERROR_OVERWRITE_RECORD_ID = 1072;
// Subrecord // Subrecord
const ERROR_SUBRECORD_MISSING_COLUMN_ID = 1100; const ERROR_SUBRECORD_MISSING_COLUMN_ID = 1100;
......
...@@ -163,7 +163,7 @@ class QuickFormQuery { ...@@ -163,7 +163,7 @@ class QuickFormQuery {
} }
/** /**
* Returns the defined forwardMode and set, if necessary, $forwardPage * Returns the defined forwardMode and set $forwardPage (call be reference)
* *
* @param $forwardPage * @param $forwardPage
* @return mixed * @return mixed
...@@ -174,7 +174,7 @@ class QuickFormQuery { ...@@ -174,7 +174,7 @@ class QuickFormQuery {
} }
/** /**
* Main entrypoint for display content: form or report * Main entrypoint for display content: a) form and/or b) report
* *
* @return string * @return string
*/ */
...@@ -450,7 +450,7 @@ class QuickFormQuery { ...@@ -450,7 +450,7 @@ class QuickFormQuery {
// Retrieve record_id either from SIP (prefered) or via URL // Retrieve record_id either from SIP (prefered) or via URL
$r = $this->store->getVar(SIP_RECORD_ID, STORE_SIP . STORE_TYPO3 . STORE_CLIENT, '', $recordIdFoundInStore); $r = $this->store->getVar(SIP_RECORD_ID, STORE_SIP . STORE_TYPO3 . STORE_CLIENT, '', $recordIdFoundInStore);
// Missing 'r' is in general an error // Set missing 'r'.
if ($r === false) { if ($r === false) {
$r = 0; $r = 0;
$this->store->setVar(TYPO3_RECORD_ID, $r, STORE_TYPO3); $this->store->setVar(TYPO3_RECORD_ID, $r, STORE_TYPO3);
...@@ -520,6 +520,8 @@ class QuickFormQuery { ...@@ -520,6 +520,8 @@ class QuickFormQuery {
} }
/** /**
* Load record $id from $table.
*
* @param string $table * @param string $table
* @param string $recordId * @param string $recordId
* @throws CodeException * @throws CodeException
...@@ -534,12 +536,20 @@ class QuickFormQuery { ...@@ -534,12 +536,20 @@ class QuickFormQuery {
} }
/** /**
* @param $sipArray * Update current SIP Store with new $recordId and update SESSION store.
*
* @param $recordId * @param $recordId
* @throws CodeException
* @throws UserFormException
*/ */
private function newRecordUpdateSip($recordId) { private function newRecordUpdateSip($recordId) {
// Update current SIP store with new RecordID // Update current SIP store with new RecordID
$sipArray = $this->store->getStore(STORE_SIP); $sipArray = $this->store->getStore(STORE_SIP);
if (isset($sipArray[SIP_RECORD_ID]) && $sipArray[SIP_RECORD_ID] > 0) {
throw new CodeException('Attemp to overwrite existing record id: SIP(otf)=' . $sipArray[SIP_SIP] . " existing_r=" . $sipArray[SIP_RECORD_ID] . " new_r=" . $recordId, ERROR_OVERWRITE_RECORD_ID);
}
$sipArray[SIP_RECORD_ID] = $recordId; $sipArray[SIP_RECORD_ID] = $recordId;
$this->store->setVarArray($sipArray, STORE_SIP, true); $this->store->setVarArray($sipArray, STORE_SIP, true);
...@@ -652,6 +662,8 @@ class QuickFormQuery { ...@@ -652,6 +662,8 @@ class QuickFormQuery {
} }
/** /**
* Based on the given SIP, create a new uniqe SIP by copying the relevant old params and taking the new recordId..
*
* @param $sipArray * @param $sipArray
* @param $recordId * @param $recordId
*/ */
...@@ -664,13 +676,14 @@ class QuickFormQuery { ...@@ -664,13 +676,14 @@ class QuickFormQuery {
case SIP_SIP: case SIP_SIP:
case SIP_URLPARAM: case SIP_URLPARAM:
case SIP_TABLE: case SIP_TABLE:
continue; continue; // do not copy these params to the new SIP
case SIP_RECORD_ID: case SIP_RECORD_ID:
// set the new recordId
$tmpParam[SIP_RECORD_ID] = $recordId; $tmpParam[SIP_RECORD_ID] = $recordId;
break; break;
default: default:
// further vars stored in old SIP (form, maybe default values) // copy further vars stored in old SIP (form, maybe default values)
$tmpParam[$key] = $value; $tmpParam[$key] = $value;
break; break;
} }
......
...@@ -182,6 +182,8 @@ class Sip { ...@@ -182,6 +182,8 @@ class Sip {
} }
/** /**
* Takes the values form an array and creates a urlparamstring. Skip values which should no passed to the urlparamstring.
*
* @param array $sipArray * @param array $sipArray
* @return string * @return string
*/ */
......
...@@ -167,6 +167,8 @@ class Store { ...@@ -167,6 +167,8 @@ class Store {
} }
/** /**
* Fills the system store.
*
* @throws CodeException * @throws CodeException
* @throws qfq\UserFormException * @throws qfq\UserFormException
*/ */
...@@ -245,6 +247,8 @@ class Store { ...@@ -245,6 +247,8 @@ class Store {
} }
/** /**
* Set or overwrite a complete store.
*
* @param array $dataArray * @param array $dataArray
* @param $store * @param $store
* @param bool|false $flagOverwrite * @param bool|false $flagOverwrite
...@@ -324,6 +328,8 @@ class Store { ...@@ -324,6 +328,8 @@ class Store {
} }
/** /**
* Fills the STORE_CLIENT
*
* @throws CodeException * @throws CodeException
*/ */
private static function fillStoreClient() { private static function fillStoreClient() {
...@@ -342,6 +348,8 @@ class Store { ...@@ -342,6 +348,8 @@ class Store {
} }
/** /**
* Fills the STORE_SIP. Reads therefore specified SIP, decode the values and stores them in STORE_SIP.
*
* @throws CodeException * @throws CodeException
* @throws UserFormException * @throws UserFormException
*/ */
...@@ -426,6 +434,8 @@ class Store { ...@@ -426,6 +434,8 @@ class Store {
} }
/** /**
* Fills the STORE_EXTRA.
*
* @throws UserFormException * @throws UserFormException
* @throws \qfq\CodeException * @throws \qfq\CodeException
*/ */
...@@ -445,6 +455,8 @@ class Store { ...@@ -445,6 +455,8 @@ class Store {
} }
/** /**
* Returns a pointer to this Class.
*
* @param string $bodytext * @param string $bodytext
* @param bool|false $phpUnit * @param bool|false $phpUnit
* @return null|\qfq\Store * @return null|\qfq\Store
...@@ -484,6 +496,8 @@ class Store { ...@@ -484,6 +496,8 @@ class Store {
} }
/** /**
* Deletes a store assigning a new empty array to it.
*
* @param $store * @param $store
* @throws UserFormException * @throws UserFormException
* @throws \qfq\CodeException * @throws \qfq\CodeException
...@@ -503,6 +517,8 @@ class Store { ...@@ -503,6 +517,8 @@ class Store {
} }
/** /**
* Set's a single $key/$value pair $store.
*
* @param string $key * @param string $key
* @param string|array $value * @param string|array $value
* @param string $store * @param string $store
...@@ -540,6 +556,8 @@ class Store { ...@@ -540,6 +556,8 @@ class Store {
} }
/** /**
* Create a SIP after a form load. This is necessary on forms without a sip and on forms with r=0 (new record).
*
* @param $formName * @param $formName
* @throws CodeException * @throws CodeException
*/ */
...@@ -570,6 +588,8 @@ class Store { ...@@ -570,6 +588,8 @@ class Store {
} }
/** /**
* Returns a pointer to this class.
*
* @return null|Sip * @return null|Sip
*/ */
public static function getSipInstance() { public static function getSipInstance() {
...@@ -577,6 +597,8 @@ class Store { ...@@ -577,6 +597,8 @@ class Store {
} }
/** /**
* Returns a complete $store.
*
* @param $store * @param $store
* @return array * @return array
* @throws UserFormException * @throws UserFormException
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment