Skip to content
GitLab
Menu
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
d2054269
Commit
d2054269
authored
Feb 04, 2019
by
Carsten Rose
Browse files
Merge branch 'qfqFluidTemplate'
parents
e5f5b75d
eea6b786
Pipeline
#1481
passed with stage
in 2 minutes and 22 seconds
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
extension/Classes/Controller/QfqController.php
View file @
d2054269
...
...
@@ -27,7 +27,9 @@ class QfqController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController {
public
function
showAction
()
{
$origErrorReporting
=
''
;
$flagOk
=
false
;
$hasError
=
true
;
$error
=
''
;
$hasContent
=
false
;
try
{
$contentObject
=
$this
->
configurationManager
->
getContentObject
();
...
...
@@ -39,38 +41,38 @@ class QfqController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController {
$qfq
=
new
\
qfq\QuickFormQuery
(
$contentObject
->
data
);
$html
=
$qfq
->
process
();
$flagOk
=
true
;
$hasContent
=
(
strlen
(
trim
(
$html
))
<=
0
);
$hasError
=
false
;
}
catch
(
qfq\UserFormException
$e
)
{
$
html
=
$e
->
formatMessage
();
$
error
=
$e
->
formatMessage
();
}
catch
(
qfq\UserReportException
$e
)
{
$
html
=
$e
->
formatMessage
();
$
error
=
$e
->
formatMessage
();
}
catch
(
qfq\CodeException
$e
)
{
$
html
=
$e
->
formatMessage
();
$
error
=
$e
->
formatMessage
();
}
catch
(
qfq\DbException
$e
)
{
$
html
=
$e
->
formatMessage
();
$
error
=
$e
->
formatMessage
();
}
catch
(
qfq\ShellException
$e
)
{
$
html
=
$e
->
formatMessage
();
$
error
=
$e
->
formatMessage
();
}
catch
(
qfq\DownloadException
$e
)
{
$
html
=
$e
->
formatMessage
();
$
error
=
$e
->
formatMessage
();
}
catch
(
\
Exception
$e
)
{
$html
=
"Generic Exception: "
.
$e
->
getMessage
();
}
if
(
!
$flagOk
)
{
$html
=
"<div class='alert alert-warning'>
$html
</div>"
;
$error
=
"Generic Exception: "
.
$e
->
getMessage
();
}
// Restore has to be outside of try/catch - E_NOTICE needs to unset for further T3 handling after an QFQ Exception.
error_reporting
(
$origErrorReporting
);
$this
->
view
->
assign
(
'qfqOutput'
,
$html
);
$this
->
view
->
assign
(
'qfqError'
,
$error
);
$this
->
view
->
assign
(
'qfqHasError'
,
$hasError
);
$this
->
view
->
assign
(
'qfqHasContent'
,
$hasContent
);
return
$this
->
view
->
render
();
}
...
...
extension/Resources/Private/Layouts/Default.html
0 → 100644
View file @
d2054269
<f:layout
name=
"Default"
/>
<f:comment>
Currently not used.
</f:comment>
<div
class=
"qfq-default-layout"
>
<f:format.raw
value=
"{qfqOutput}"
/>
</div>
extension/Resources/Private/Layouts/Layout1.html
0 → 100644
View file @
d2054269
<f:layout
name=
"Layout 1"
>
<div
class=
"qfq-layout-1"
>
<f:format.raw
value=
"{qfqOutput}"
/>
</div>
</f:layout>
\ No newline at end of file
extension/Resources/Private/Layouts/Layout2.html
0 → 100644
View file @
d2054269
<f:layout
name=
"Layout 2"
>
<div
class=
"qfq-layout-2"
>
<f:format.raw
value=
"{qfqOutput}"
/>
</div>
</f:layout>
\ No newline at end of file
extension/Resources/Private/Layouts/Layout3.html
0 → 100644
View file @
d2054269
<f:layout
name=
"Layout 3"
/>
<f:comment>
Unwrapped raw output.
</f:comment>
<f:format.raw
value=
"{qfqOutput}"
/>
extension/Resources/Private/Templates/Qfq/Show.html
View file @
d2054269
<f:format.raw
value=
"{qfqOutput}"
/>
<html
xmlns:f=
"http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
data-namespace-typo3-fluid=
"true"
>
<f:if
condition=
"{qfqHasContent}"
>
<div
class=
"qfq-default-layout"
>
<f:format.raw
value=
"{qfqOutput}"
/>
</div>
</f:if>
<f:if
condition=
"{qfqHasError}"
>
<div
class=
"alert alert-warning"
>
<f:format.raw
value=
"{qfqError}"
/>
</div>
</f:if>
\ No newline at end of file
Carsten Rose
@carsten.rose
mentioned in commit
a214c480
·
Feb 05, 2019
mentioned in commit
a214c480
mentioned in commit a214c48053c14f1db76c2786fed2a0a3f62b9258
Toggle commit list
Write
Preview
Supports
Markdown
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