getVar(TYPO3_PAGE_ID, STORE_TYPO3);
}
// TYPE
$tmp = $store->getVar(TYPO3_PAGE_TYPE, STORE_TYPO3);
if ($tmp !== false && $tmp != 0) {
$queryArray['type'] = $tmp;
}
// Language
$tmp = $store->getVar(TYPO3_PAGE_LANGUAGE, STORE_TYPO3);
if ($tmp !== false && $tmp != 0) {
$queryArray['L'] = $tmp;
}
}
/**
* Builds a urlencoded query string of an assoc array.
*
* @param array $queryArray
* @return string Querystring (e.g.: id=23&type=99
*/
public static function arrayToQueryString(array $queryArray) {
$items = array();
foreach ($queryArray as $key => $value) {
if (is_int($key)) {
$items[] = urlencode($value);
} else {
$items[] = $key . '=' . urlencode($value);
}
}
return implode('&', $items);
}
/**
* Extract Tag from $tag (eg: , might contain further attributes) and wrap it around $value. If $flagOmitEmpty==true && $value=='': return ''.
*
* @param string $tag
* @param string $value
* @param bool|false $omitIfValueEmpty
* @return string
*/
public static function wrapTag($tag, $value, $omitIfValueEmpty = false) {
if ($omitIfValueEmpty && $value === "")
return '';
// a)
, b)