Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
0c9bf22e
Commit
0c9bf22e
authored
May 16, 2018
by
Carsten Rose
Browse files
PHPDoc: Run phpstorm 'inspect code' on whole project for PHPDoc.
parent
401c5c40
Changes
74
Hide whitespace changes
Inline
Side-by-side
extension/qfq/external/AutoCron.php
View file @
0c9bf22e
...
...
@@ -18,6 +18,10 @@ require_once(__DIR__ . '/../qfq/Evaluate.php');
require_once
(
__DIR__
.
'/../qfq/report/SendMail.php'
);
require_once
(
__DIR__
.
'/../qfq/helper/Support.php'
);
/**
* Class AutoCron
* @package qfq
*/
class
AutoCron
{
/**
...
...
@@ -45,6 +49,13 @@ class AutoCron {
private
$verbose
=
''
;
/**
* AutoCron constructor.
* @param bool $verbose
* @param bool $phpUnit
* @throws CodeException
* @throws UserFormException
*/
public
function
__construct
(
$verbose
=
false
,
$phpUnit
=
false
)
{
$this
->
verbose
=
$verbose
;
...
...
@@ -129,6 +140,8 @@ class AutoCron {
* @param array $job
*
* @return array $job, updated with AUTOCRON_LAST_STATUS
* @throws CodeException
* @throws UserFormException
*/
private
function
doJobWebsite
(
array
$job
)
{
...
...
@@ -212,6 +225,10 @@ class AutoCron {
* @param array $job
*
* @return array $job, updated with AUTOCRON_LAST_STATUS
* @throws CodeException
* @throws DbException
* @throws UserFormException
* @throws UserReportException
*/
private
function
doJobMail
(
array
$job
)
{
...
...
@@ -260,6 +277,8 @@ class AutoCron {
*
* @throws CodeException
* @throws DbException
* @throws ShellException
* @throws UserFormException
*/
public
function
process
()
{
...
...
extension/qfq/qfq/AbstractBuildForm.php
View file @
0c9bf22e
...
...
@@ -86,6 +86,8 @@ abstract class AbstractBuildForm {
* @param array $feSpecAction
* @param array $feSpecNative
* @param array $db
* @throws CodeException
* @throws UserFormException
*/
public
function
__construct
(
array
$formSpec
,
array
$feSpecAction
,
array
$feSpecNative
,
array
$db
=
null
)
{
$this
->
formSpec
=
$formSpec
;
...
...
@@ -247,7 +249,11 @@ abstract class AbstractBuildForm {
/**
* Builds the head area of the form.
*
* @param string $mode
* @return string
* @throws CodeException
* @throws DbException
* @throws UserFormException
*/
public
function
head
(
$mode
=
FORM_LOAD
)
{
$html
=
''
;
...
...
@@ -278,6 +284,7 @@ abstract class AbstractBuildForm {
* @return string String: <a href="?pageId&sip=....">Edit</a> <small>[sip:..., r:..., urlparam:...,
* ...]</small>
* @throws CodeException
* @throws UserFormException
*/
public
function
createFormEditorUrl
(
$form
,
$recordId
,
array
$param
=
array
())
{
...
...
@@ -323,6 +330,8 @@ abstract class AbstractBuildForm {
* Returns '<form ...>'-tag with various attributes.
*
* @return string
* @throws CodeException
* @throws DbException
*/
public
function
getFormTag
()
{
$md5
=
''
;
...
...
@@ -378,6 +387,7 @@ abstract class AbstractBuildForm {
* Create HTML Input vars to detect bot automatic filling of forms.
*
* @return string
* @throws CodeException
*/
public
function
getHoneypotVars
()
{
$html
=
''
;
...
...
@@ -402,6 +412,8 @@ abstract class AbstractBuildForm {
* Build an assoc array with standard form attributes.
*
* @return array
* @throws CodeException
* @throws DbException
*/
public
function
getFormTagAttributes
()
{
...
...
@@ -436,7 +448,6 @@ abstract class AbstractBuildForm {
* Notice: the SIP will be transferred as POST Parameter.
*
* @return string
* @throws DbException
*/
public
function
getActionUrl
()
{
...
...
@@ -449,6 +460,7 @@ abstract class AbstractBuildForm {
* See: https://www.w3.org/wiki/HTML/Elements/form#HTML_Attributes
*
* @return string
* @throws CodeException
* @throws DbException
*/
public
function
getEncType
()
{
...
...
@@ -465,6 +477,7 @@ abstract class AbstractBuildForm {
* @param array|string $value
*
* @return array|string
* @throws CodeException
* @throws UserFormException
*/
private
function
processReportSyntax
(
$value
)
{
...
...
@@ -769,7 +782,10 @@ abstract class AbstractBuildForm {
}
/**
*
* @param $label
* @param $input
* @param $note
* @return
*/
abstract
public
function
fillWrapLabelInputNote
(
$label
,
$input
,
$note
);
...
...
@@ -862,6 +878,8 @@ abstract class AbstractBuildForm {
* @param array $formElement
*
* @return array
* @throws CodeException
* @throws UserFormException
*/
private
function
getFormElementForJson
(
$htmlFormElementName
,
$value
,
array
$formElement
)
{
...
...
@@ -987,6 +1005,7 @@ abstract class AbstractBuildForm {
* @param string $addClass
*
* @return string
* @throws CodeException
*/
public
function
buildLabel
(
$htmlFormElementName
,
$label
,
$addClass
=
''
)
{
$attributes
=
Support
::
doAttribute
(
'for'
,
$htmlFormElementName
);
...
...
@@ -1000,8 +1019,10 @@ abstract class AbstractBuildForm {
/**
* Takes the current SIP ('form' and additional parameter), set SIP_RECORD_ID=0 and create a new 'NewRecordUrl'.
*
* @param $toolTipNew
* @return string
* @throws CodeException
* @throws
\qfq\
UserFormException
* @throws UserFormException
*/
public
function
deriveNewRecordUrlFromExistingSip
(
&
$toolTipNew
)
{
...
...
@@ -1023,12 +1044,32 @@ abstract class AbstractBuildForm {
return
$url
;
}
/**
* @param array $formElement
* @param $elementHtml
* @return mixed
*/
abstract
public
function
buildRowPill
(
array
$formElement
,
$elementHtml
);
/**
* @param array $formElement
* @param $elementHtml
* @return mixed
*/
abstract
public
function
buildRowFieldset
(
array
$formElement
,
$elementHtml
);
/**
* @param array $formElement
* @param $elementHtml
* @return mixed
*/
abstract
public
function
buildRowTemplateGroup
(
array
$formElement
,
$elementHtml
);
/**
* @param array $formElement
* @param $elementHtml
* @return mixed
*/
abstract
public
function
buildRowSubrecord
(
array
$formElement
,
$elementHtml
);
/**
...
...
@@ -1045,7 +1086,8 @@ abstract class AbstractBuildForm {
* @param string $mode FORM_LOAD | FORM_UPDATE | FORM_SAVE
*
* @return string complete rendered HTML input element.
* @throws \qfq\UserFormException
* @throws CodeException
* @throws UserFormException
*/
public
function
buildInput
(
array
$formElement
,
$htmlFormElementName
,
$value
,
array
&
$json
,
$mode
=
FORM_LOAD
)
{
$textarea
=
''
;
...
...
@@ -1190,6 +1232,7 @@ abstract class AbstractBuildForm {
* @param array $formElement
*
* @return string
* @throws CodeException
* @throws UserFormException
*/
private
function
typeAheadBuildParam
(
array
&
$formElement
)
{
...
...
@@ -1295,6 +1338,7 @@ abstract class AbstractBuildForm {
* @param bool $flagOmitEmpty
*
* @return string
* @throws CodeException
*/
private
function
getAttributeList
(
array
$formElement
,
array
$attributeList
,
$flagOmitEmpty
=
true
)
{
$attribute
=
''
;
...
...
@@ -1311,7 +1355,9 @@ abstract class AbstractBuildForm {
*
* @param string $feMode
*
* @param bool $cssDisable
* @return string
* @throws CodeException
* @throws UserFormException
*/
private
function
getAttributeFeMode
(
$feMode
,
$cssDisable
=
true
)
{
...
...
@@ -1497,6 +1543,7 @@ abstract class AbstractBuildForm {
* @param string $fieldType
*
* @return array
* @throws CodeException
* @throws UserFormException
*/
private
function
getItemsForEnumOrSet
(
$column
,
&
$fieldType
)
{
...
...
@@ -1542,6 +1589,7 @@ abstract class AbstractBuildForm {
* @param array $itemKey
* @param array $formElement
*
* @throws CodeException
* @throws UserFormException
*/
private
function
prepareCheckboxCheckedUncheckedValue
(
array
$itemKey
,
array
&
$formElement
)
{
...
...
@@ -1576,13 +1624,14 @@ abstract class AbstractBuildForm {
*
* @param array $formElement
* @param string $htmlFormElementName
* @param $attribute
* @param string $value
* @param array $json
* @param string $mode FORM_LOAD | FORM_UPDATE | FORM_SAVE
*
* @return string
* @throws CodeException
* @throws
\qfq\
UserFormException
* @throws UserFormException
*/
public
function
buildCheckboxSingle
(
array
$formElement
,
$htmlFormElementName
,
$attribute
,
$value
,
array
&
$json
,
$mode
=
FORM_LOAD
)
{
...
...
@@ -1616,6 +1665,8 @@ abstract class AbstractBuildForm {
* @param array $json
*
* @return string
* @throws CodeException
* @throws UserFormException
*/
public
function
constructCheckboxSingleButton
(
array
$formElement
,
$htmlFormElementName
,
$attribute
,
$value
,
array
&
$json
)
{
$html
=
''
;
...
...
@@ -1674,6 +1725,8 @@ abstract class AbstractBuildForm {
* @param array $json
*
* @return string
* @throws CodeException
* @throws UserFormException
*/
public
function
constructCheckboxSinglePlain
(
array
$formElement
,
$htmlFormElementName
,
$attribute
,
$value
,
array
&
$json
)
{
$html
=
''
;
...
...
@@ -1716,13 +1769,14 @@ abstract class AbstractBuildForm {
*
* @param array $formElement
* @param string $htmlFormElementName
* @param $attributeBase
* @param string $value
* @param array $itemKey
* @param array $itemValue
* @param array $json
* @param string $mode FORM_LOAD | FORM_UPDATE | FORM_SAVE
*
* @return string
* @throws CodeException
* @throws
\qfq\
UserFormException
* @throws UserFormException
*/
public
function
buildCheckboxMulti
(
array
$formElement
,
$htmlFormElementName
,
$attributeBase
,
$value
,
array
$itemKey
,
array
$itemValue
,
array
&
$json
)
{
...
...
@@ -1774,6 +1828,8 @@ abstract class AbstractBuildForm {
* @param array $json
*
* @return string
* @throws CodeException
* @throws UserFormException
*/
public
function
constructCheckboxMultiButton
(
array
$formElement
,
$htmlFormElementName
,
$attributeBase
,
$value
,
array
$itemKey
,
array
$itemValue
,
array
&
$json
)
{
$json
=
array
();
...
...
@@ -1845,6 +1901,8 @@ abstract class AbstractBuildForm {
* @param array $json
*
* @return string
* @throws CodeException
* @throws UserFormException
*/
public
function
constructCheckboxMultiPlain
(
array
$formElement
,
$htmlFormElementName
,
$attributeBase
,
$value
,
array
$itemKey
,
array
$itemValue
,
array
&
$json
)
{
$json
=
array
();
...
...
@@ -2253,6 +2311,7 @@ abstract class AbstractBuildForm {
* @param array $control Array with <th> column names / format.
*
* @return string
* @throws UserFormException
*/
private
function
subrecordHead
(
$linkNew
,
$flagDelete
,
array
$firstRow
,
array
&
$control
)
{
...
...
@@ -2440,7 +2499,11 @@ abstract class AbstractBuildForm {
* @param string $targetRecordId
* @param array $record
*
* @param $symbol
* @param $toolTip
* @param array $currentRow
* @return string
* @throws CodeException
* @throws UserFormException
*/
private
function
createFormLink
(
array
$formElement
,
$targetRecordId
,
array
$record
,
$symbol
,
$toolTip
,
$currentRow
=
array
())
{
...
...
@@ -2619,6 +2682,9 @@ abstract class AbstractBuildForm {
* @param string $columnValue
*
* @return string
* @throws CodeException
* @throws UserFormException
* @throws UserReportException
*/
private
function
renderCell
(
array
$control
,
$columnName
,
$columnValue
)
{
$link
=
null
;
...
...
@@ -2682,6 +2748,7 @@ abstract class AbstractBuildForm {
*
* @return string String: "API_DIR/delete.php?sip=...."
* @throws CodeException
* @throws UserFormException
*/
public
function
createDeleteUrl
(
$formName
,
$recordId
,
$mode
=
RETURN_URL
)
{
...
...
@@ -2710,7 +2777,9 @@ abstract class AbstractBuildForm {
*
* @return string
* @throws CodeException
* @throws \qfq\UserFormException
* @throws DbException
* @throws UserFormException
* @throws UserReportException
*/
public
function
buildFile
(
array
$formElement
,
$htmlFormElementName
,
$value
,
array
&
$json
,
$mode
=
FORM_LOAD
)
{
$attribute
=
''
;
...
...
@@ -2949,6 +3018,7 @@ abstract class AbstractBuildForm {
* @param string $pathFileName
* @return string SIP encoded URL
* @throws CodeException
* @throws UserFormException
*/
private
function
fileToSipUrl
(
$pathFileName
)
{
$param
[
DOWNLOAD_MODE
]
=
DOWNLOAD_MODE_FILE
;
...
...
@@ -2972,6 +3042,7 @@ abstract class AbstractBuildForm {
* @param string $mode FORM_LOAD | FORM_UPDATE | FORM_SAVE
*
* @return string
* @throws CodeException
* @throws UserFormException
*/
public
function
buildDateTime
(
array
$formElement
,
$htmlFormElementName
,
$value
,
array
&
$json
,
$mode
=
FORM_LOAD
)
{
...
...
@@ -3084,6 +3155,7 @@ abstract class AbstractBuildForm {
* @param string $mode FORM_LOAD | FORM_UPDATE | FORM_SAVE
*
* @return string
* @throws CodeException
* @throws UserFormException
*/
public
function
buildDateJQW
(
array
$formElement
,
$htmlFormElementName
,
$value
,
array
&
$json
,
$mode
=
FORM_LOAD
)
{
...
...
@@ -3167,7 +3239,8 @@ abstract class AbstractBuildForm {
* @param string $mode
*
* @return string
* @throws \qfq\UserFormException
* @throws CodeException
* @throws UserFormException
*/
public
function
buildEditor
(
array
$formElement
,
$htmlFormElementName
,
$value
,
array
&
$json
,
$mode
=
FORM_LOAD
)
{
$attribute
=
''
;
...
...
@@ -3314,10 +3387,12 @@ abstract class AbstractBuildForm {
* @param array $formElement
* @param string $htmlFormElementName
* @param string $value
* @param string $mode FORM_LOAD | FORM_UPDATE | FORM_SAVE
* @param array $json
*
* @param string $mode FORM_LOAD | FORM_UPDATE | FORM_SAVE
* @return mixed
* @throws CodeException
* @throws UserFormException
*/
public
function
buildNote
(
array
$formElement
,
$htmlFormElementName
,
$value
,
array
&
$json
,
$mode
=
FORM_LOAD
)
{
...
...
@@ -3354,6 +3429,7 @@ abstract class AbstractBuildForm {
* @return mixed
* @throws CodeException
* @throws DbException
* @throws UserFormException
*/
public
function
buildFieldset
(
array
$formElement
,
$htmlFormElementName
,
$value
,
array
&
$json
,
$mode
=
FORM_LOAD
)
{
$attribute
=
''
;
...
...
@@ -3422,6 +3498,7 @@ abstract class AbstractBuildForm {
* @return mixed
* @throws CodeException
* @throws DbException
* @throws UserFormException
*/
public
function
buildTemplateGroup
(
array
$formElement
,
$htmlFormElementName
,
$value
,
array
&
$json
,
$mode
=
FORM_LOAD
)
{
$attribute
=
''
;
...
...
@@ -3535,7 +3612,8 @@ EOT;
*
* @return string
* @throws CodeException
* @throws \qfq\UserFormException
* @throws DbException
* @throws UserFormException
*/
private
function
templateGroupCollectFilledElements
(
$max
,
$htmlDelete
,
array
&
$json
)
{
...
...
@@ -3637,6 +3715,12 @@ EOT;
return
$tgMax
;
}
/**
* @param array $formElement
* @param $htmlElement
* @param $htmlFormElementName
* @return mixed
*/
abstract
public
function
buildRowNative
(
array
$formElement
,
$htmlElement
,
$htmlFormElementName
);
}
\ No newline at end of file
extension/qfq/qfq/BodytextParser.php
View file @
0c9bf22e
...
...
@@ -13,6 +13,10 @@ const NESTING_TOKEN_CLOSE = '#&nesting-close&#';
const
NESTING_TOKEN_LENGTH
=
17
;
/**
* Class BodytextParser
* @package qfq
*/
class
BodytextParser
{
/**
...
...
@@ -50,6 +54,8 @@ class BodytextParser {
*
* @param $bodytext
*
* @param $nestingOpen
* @param $nestingClose
* @return string
*/
...
...
@@ -213,6 +219,8 @@ class BodytextParser {
*
* @param $bodytext
*
* @param $nestingOpen
* @param $nestingClose
* @return mixed
*/
private
function
encryptNestingDelimeter
(
$bodytext
,
$nestingOpen
,
$nestingClose
)
{
...
...
@@ -247,6 +255,8 @@ class BodytextParser {
*
* @param $bodytext
*
* @param $nestingOpen
* @param $nestingClose
* @return mixed|string
* @throws UserFormException
*/
...
...
@@ -314,6 +324,8 @@ class BodytextParser {
*
* @param $bodytext
*
* @param $nestingOpen
* @param $nestingClose
* @return mixed
*/
private
function
decryptNestingDelimeter
(
$bodytext
,
$nestingOpen
,
$nestingClose
)
{
...
...
extension/qfq/qfq/BuildFormBootstrap.php
View file @
0c9bf22e
...
...
@@ -28,6 +28,8 @@ class BuildFormBootstrap extends AbstractBuildForm {
* @param array $feSpecAction
* @param array $feSpecNative
* @param array $db Array of 'Database' instances
* @throws CodeException
* @throws UserFormException
*/
public
function
__construct
(
array
$formSpec
,
array
$feSpecAction
,
array
$feSpecNative
,
array
$db
)
{
parent
::
__construct
(
$formSpec
,
$feSpecAction
,
$feSpecNative
,
$db
);
...
...
@@ -67,6 +69,7 @@ class BuildFormBootstrap extends AbstractBuildForm {
* @param string $addClass
*
* @return string
* @throws CodeException
*/
public
function
getRowOpenTag
(
$addClass
=
''
)
{
$class
=
Support
::
doAttribute
(
'class'
,
[
$this
->
wrap
[
WRAP_SETUP_ELEMENT
][
WRAP_SETUP_CLASS
],
$addClass
]);
...
...
@@ -105,7 +108,11 @@ class BuildFormBootstrap extends AbstractBuildForm {
}
/**
* @param string $mode
* @return string
* @throws CodeException
* @throws DbException
* @throws UserFormException
*/
public
function
head
(
$mode
=
FORM_LOAD
)
{
$html
=
''
;
...
...
@@ -151,6 +158,8 @@ class BuildFormBootstrap extends AbstractBuildForm {
* Creates a button to open 'CopyForm' with the current form as source.
*
* @return string - the rendered button
* @throws CodeException
* @throws UserFormException
*/
private
function
buildButtonCopyForm
()
{
...
...
@@ -181,6 +190,9 @@ class BuildFormBootstrap extends AbstractBuildForm {
* Creates a link to open current form loaded in FormEditor
*
* @return string - the rendered Checkbox
* @throws CodeException
* @throws DbException
* @throws UserFormException
*/
private
function
buildViewForm
()
{
...
...
@@ -227,6 +239,8 @@ class BuildFormBootstrap extends AbstractBuildForm {
* Simulate Submit Button: http://www.javascript-coder.com/javascript-form/javascript-form-submit.phtml
*
* @return string
* @throws CodeException
* @throws UserFormException
*/
private
function
buildButtons
()
{
$buttonNew
=
''
;
...
...
@@ -312,6 +326,7 @@ class BuildFormBootstrap extends AbstractBuildForm {
* @param string $class
*
* @return string
* @throws CodeException
*/
private
function
buildButtonAnchor
(
$url
,
$buttonHtmlId
,
$text
,
$toolTip
,
$icon
,
$disabled
=
''
,
$class
=
''
)
{
...
...
@@ -338,7 +353,10 @@ class BuildFormBootstrap extends AbstractBuildForm {
* @param string $icon
* @param string $disabled
*
* @param string $buttonOnChangeClass
* @param string $class
* @return string
* @throws CodeException
*/
private
function
buildButtonCode
(
$buttonHtmlId
,
$text
,
$tooltip
,
$icon
,
$disabled
=
''
,
$buttonOnChangeClass
=
''
,
$class
=
''
)
{
...
...
@@ -492,6 +510,8 @@ class BuildFormBootstrap extends AbstractBuildForm {
* Builds the complete HTML '<form ...>'-tag
*
* @return string
* @throws CodeException
* @throws DbException
*/
public
function
getFormTag
()
{
...
...
@@ -511,6 +531,8 @@ class BuildFormBootstrap extends AbstractBuildForm {
/**
* @return string
* @throws CodeException
* @throws UserFormException
*/
public
function
tail
()
{
...
...
@@ -586,7 +608,11 @@ EOF;
* @param $htmlFormElementName
* @param $value
*
* @param array $json
* @return mixed
* @throws CodeException
* @throws DbException
* @throws UserFormException
*/
public
function
buildPill
(
array
$formElement
,
$htmlFormElementName
,
$value
,
array
&
$json
)
{
$html
=
''
;
...
...
@@ -611,7 +637,8 @@ EOF;
* @param $htmlFormElementName
*
* @return string Wrapped $htmlElement
* @throws \qfq\UserFormException
* @throws CodeException
* @throws UserFormException
*/
public
function
buildRowNative
(
array
$formElement
,
$htmlElement
,
$htmlFormElementName
)
{
$html
=
''
;
...
...
@@ -726,6 +753,7 @@ EOF;
*
* @param $formElement
* @param $elementHtml
* @return
*/
public
function
buildRowFieldset
(
array
$formElement
,
$elementHtml
)
{
$html
=
$elementHtml
;
...
...
@@ -738,6 +766,7 @@ EOF;
*
* @param $formElement
* @param $elementHtml
* @return mixed
*/
public
function
buildRowTemplateGroup
(
array
$formElement
,
$elementHtml
)
{
$html
=
$elementHtml
;
...
...
@@ -746,10 +775,11 @@ EOF;
}
/**
* @param $formElement
* @param
array
$formElement
* @param $elementHtml
*
* @return string
* @throws CodeException
*/
public
function
buildRowSubrecord
(
array
$formElement
,
$elementHtml
)
{
...
...
@@ -771,11 +801,13 @@ EOF;
*
* @param string $mode FORM_LOAD | FORM_UPDATE | FORM_SAVE
*
* @param bool $htmlElementNameIdZero
* @param array $latestFeSpecNative
* @return string|array $mode=LOAD_FORM: The whole form as HTML, $mode=FORM_UPDATE /FORM_SAVE: array of all
* formElement.dynamicUpdate-yes values/states
* @throws CodeException
* @throws DbException
* @throws
\qfq\
UserFormException
* @throws UserFormException
*/
public
function
process
(
$mode
,
$htmlElementNameIdZero
=
false
,
$latestFeSpecNative
=
array
())
{