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
4014a4c0
Commit
4014a4c0
authored
Jan 30, 2016
by
Carsten Rose
Browse files
Support: appendTypo3Paramter(): added 'id' as Typo3 Parameter.
parent
b795dd8b
Changes
1
Hide whitespace changes
Inline
Side-by-side
qfq/helper/Support.php
View file @
4014a4c0
...
...
@@ -12,6 +12,21 @@ require_once(__DIR__ . '/Sanatize.php');
class
Support
{
/**
* @param array $queryArray Empty or prefilled assoc array with url parameter
*/
public
static
function
appendTypo3ParameterToArray
(
array
&
$queryArray
)
{
if
(
isset
(
$_GET
[
'id'
]))
$queryArray
[
'id'
]
=
self
::
getCurrentPage
();
if
(
isset
(
$_GET
[
'L'
]))
$queryArray
[
'L'
]
=
$_GET
[
'L'
];
if
(
isset
(
$_GET
[
'type'
]))
$queryArray
[
'type'
]
=
$_GET
[
'type'
];
}
/**
* @return string If exist content of $_GET[], otherwise the name of the first GET Parameter
* @throws CodeException
...
...
@@ -27,20 +42,10 @@ class Support {
}
/**
* @param array $queryArray Empty or prefilled assoc array with url parameter
*/
public
static
function
appendTypo3ParameterToArray
(
array
&
$queryArray
)
{
if
(
isset
(
$_GET
[
'L'
]))
$queryArray
[
'L'
]
=
$_GET
[
'L'
];
if
(
isset
(
$_GET
[
'type'
]))
$queryArray
[
'type'
]
=
$_GET
[
'type'
];
}
/**
* Builds a urlencoded query string of assoc array
* Builds a urlencoded query string of an assoc array.
*
* @param array $queryArray
* @return string
* @return string
Querystring (e.g.: id=23&type=99
*/
public
static
function
arrayToQueryString
(
array
$queryArray
)
{
$items
=
array
();
...
...
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