Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
b331c952
Commit
b331c952
authored
Dec 17, 2016
by
Carsten Rose
Browse files
Update function headers.
parent
de377b07
Changes
5
Hide whitespace changes
Inline
Side-by-side
extension/qfq/qfq/AbstractBuildForm.php
View file @
b331c952
...
...
@@ -281,6 +281,8 @@ abstract class AbstractBuildForm {
}
/**
* Return a uniq form id
*
* @return string
*/
public
function
getFormId
()
{
...
...
@@ -467,6 +469,8 @@ abstract class AbstractBuildForm {
}
/**
* Create an array with standard elements and add 'form-element', 'value'.
*
* @param $htmlFormElementId
* @param string|array $value
* @param string $feMode disabled|readonly|''
...
...
@@ -497,6 +501,8 @@ abstract class AbstractBuildForm {
}
/**
* Depending of $feMode set variables $hidden, $disabled, $required to 'yes' or 'no'.
*
* @param $feMode
* @param $hidden
* @param $disabled
...
...
@@ -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
*/
private
function
adjustMaxLength
(
array
&
$formElement
)
{
...
...
@@ -848,6 +856,8 @@ abstract class AbstractBuildForm {
}
/**
* Build HelpBlock
*
* @return string
*/
private
function
getHelpBlock
()
{
...
...
@@ -2030,6 +2040,8 @@ abstract class AbstractBuildForm {
}
/**
* Parse $formElement[FE_EDITOR_*] settings and build editor settings.
*
* @param array $formElement
* @param $htmlFormElementId
* @return array
...
...
@@ -2207,6 +2219,8 @@ abstract class AbstractBuildForm {
}
/**
* Create a delete link.
*
* @param $table
* @param $recordId
* @param $symbol
...
...
extension/qfq/qfq/Constants.php
View file @
b331c952
...
...
@@ -153,6 +153,7 @@ const ERROR_UNKNOWN_ESCAPE_MODE = 1068;
const
ERROR_MISSING_CONFIG_INI_VALUE
=
1069
;
const
ERROR_SENDMAIL
=
1070
;
const
ERROR_SENDMAIL_MISSING_VALUE
=
1071
;
const
ERROR_OVERWRITE_RECORD_ID
=
1072
;
// Subrecord
const
ERROR_SUBRECORD_MISSING_COLUMN_ID
=
1100
;
...
...
extension/qfq/qfq/QuickFormQuery.php
View file @
b331c952
...
...
@@ -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
* @return mixed
...
...
@@ -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
*/
...
...
@@ -450,7 +450,7 @@ class QuickFormQuery {
// Retrieve record_id either from SIP (prefered) or via URL
$r
=
$this
->
store
->
getVar
(
SIP_RECORD_ID
,
STORE_SIP
.
STORE_TYPO3
.
STORE_CLIENT
,
''
,
$recordIdFoundInStore
);
//
M
issing 'r'
is in general an error
//
Set m
issing 'r'
.
if
(
$r
===
false
)
{
$r
=
0
;
$this
->
store
->
setVar
(
TYPO3_RECORD_ID
,
$r
,
STORE_TYPO3
);
...
...
@@ -520,6 +520,8 @@ class QuickFormQuery {
}
/**
* Load record $id from $table.
*
* @param string $table
* @param string $recordId
* @throws CodeException
...
...
@@ -534,12 +536,20 @@ class QuickFormQuery {
}
/**
* @param $sipArray
* Update current SIP Store with new $recordId and update SESSION store.
*
* @param $recordId
* @throws CodeException
* @throws UserFormException
*/
private
function
newRecordUpdateSip
(
$recordId
)
{
// Update current SIP store with new RecordID
$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
;
$this
->
store
->
setVarArray
(
$sipArray
,
STORE_SIP
,
true
);
...
...
@@ -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 $recordId
*/
...
...
@@ -664,13 +676,14 @@ class QuickFormQuery {
case
SIP_SIP
:
case
SIP_URLPARAM
:
case
SIP_TABLE
:
continue
;
continue
;
// do not copy these params to the new SIP
case
SIP_RECORD_ID
:
// set the new recordId
$tmpParam
[
SIP_RECORD_ID
]
=
$recordId
;
break
;
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
;
break
;
}
...
...
extension/qfq/qfq/store/Sip.php
View file @
b331c952
...
...
@@ -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
* @return string
*/
...
...
extension/qfq/qfq/store/Store.php
View file @
b331c952
...
...
@@ -167,6 +167,8 @@ class Store {
}
/**
* Fills the system store.
*
* @throws CodeException
* @throws qfq\UserFormException
*/
...
...
@@ -245,6 +247,8 @@ class Store {
}
/**
* Set or overwrite a complete store.
*
* @param array $dataArray
* @param $store
* @param bool|false $flagOverwrite
...
...
@@ -324,6 +328,8 @@ class Store {
}
/**
* Fills the STORE_CLIENT
*
* @throws CodeException
*/
private
static
function
fillStoreClient
()
{
...
...
@@ -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 UserFormException
*/
...
...
@@ -426,6 +434,8 @@ class Store {
}
/**
* Fills the STORE_EXTRA.
*
* @throws UserFormException
* @throws \qfq\CodeException
*/
...
...
@@ -445,6 +455,8 @@ class Store {
}
/**
* Returns a pointer to this Class.
*
* @param string $bodytext
* @param bool|false $phpUnit
* @return null|\qfq\Store
...
...
@@ -484,6 +496,8 @@ class Store {
}
/**
* Deletes a store assigning a new empty array to it.
*
* @param $store
* @throws UserFormException
* @throws \qfq\CodeException
...
...
@@ -503,6 +517,8 @@ class Store {
}
/**
* Set's a single $key/$value pair $store.
*
* @param string $key
* @param string|array $value
* @param string $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
* @throws CodeException
*/
...
...
@@ -570,6 +588,8 @@ class Store {
}
/**
* Returns a pointer to this class.
*
* @return null|Sip
*/
public
static
function
getSipInstance
()
{
...
...
@@ -577,6 +597,8 @@ class Store {
}
/**
* Returns a complete $store.
*
* @param $store
* @return array
* @throws UserFormException
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment