本文整理汇总了PHP中TYPO3\CMS\Core\Utility\VersionNumberUtility::getCurrentTypo3Version方法的典型用法代码示例。如果您正苦于以下问题:PHP VersionNumberUtility::getCurrentTypo3Version方法的具体用法?PHP VersionNumberUtility::getCurrentTypo3Version怎么用?PHP VersionNumberUtility::getCurrentTypo3Version使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TYPO3\CMS\Core\Utility\VersionNumberUtility
的用法示例。
在下文中一共展示了VersionNumberUtility::getCurrentTypo3Version方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: main
/**
* MAIN function for cache information
*
* @return string Output HTML for the module.
*/
public function main()
{
$typo3VersionArray = VersionNumberUtility::convertVersionStringToArray(VersionNumberUtility::getCurrentTypo3Version());
$this->typo3VersionMain = $typo3VersionArray['version_main'];
if ($this->typo3VersionMain > 6) {
$this->iconFactory = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Imaging\\IconFactory');
}
if ($this->pObj->id) {
$result = $this->createModuleContentForPage();
} else {
$result = '<p>' . $GLOBALS['LANG']->getLL('no_page_id') . '</p>';
}
return $result;
}
示例2: getInstalledVersion
/**
* Get current installed version number
*
* @return string
*/
public function getInstalledVersion()
{
return VersionNumberUtility::getCurrentTypo3Version();
}
示例3: useCompatibility6
private static function useCompatibility6()
{
return version_compare(\TYPO3\CMS\Core\Utility\VersionNumberUtility::getCurrentTypo3Version(), '7.6.0', '<');
}
示例4: die
<?php
if (!defined('TYPO3_MODE')) {
die('Access denied.');
}
\R3H6\Error404page\Utility\CustomPageUtility::addDoktype($_EXTKEY, \R3H6\Error404page\Configuration\ExtensionConfiguration::get('doktypeError404page'), 'Error404page');
if (TYPO3_MODE === 'BE' && \R3H6\Error404page\Configuration\ExtensionConfiguration::get('enableErrorLog')) {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScriptSetup('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:error404page/Configuration/TypoScript/setup.txt">');
if (version_compare(\TYPO3\CMS\Core\Utility\VersionNumberUtility::getCurrentTypo3Version(), '7.6.0', '<')) {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScriptSetup('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:error404page/Configuration/TypoScript/Compatibility6/setup.txt">');
}
/**
* Registers a Backend Module
*/
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule('R3H6.' . $_EXTKEY, 'web', 'statistic', '', array('Error' => 'dashboard, list, show, deleteAll'), array('access' => 'user,group', 'icon' => 'EXT:' . $_EXTKEY . '/ext_icon.svg', 'labels' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_statistic.xlf'));
}
if (version_compare(\TYPO3\CMS\Core\Utility\VersionNumberUtility::getCurrentTypo3Version(), '7.4.0', '>=')) {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::registerPageTSConfigFile($_EXTKEY, 'Configuration/PageTS/Redirect403.txt', 'EXT:error404page :: Redirect 403 error to login page');
}
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('tx_error404page_domain_model_error', 'EXT:error404page/Resources/Private/Language/locallang_csh_tx_error404page_domain_model_error.xlf');
示例5: header
header('HTTP/1.0 403 Request not allowed');
} else {
echo $token;
}
} else {
header('HTTP/1.0 500 Invalid request');
}
} else {
$sessionToken = NULL;
$data = NULL;
$signature = NULL;
if (isset($_POST['st']) && isset($_POST['d']) && isset($_POST['s'])) {
$sessionToken = $_POST['st'];
$data = $_POST['d'];
$signature = $_POST['s'];
} else {
header('HTTP/1.0 500 Invalid request');
}
// handle data string correctly, if typo3 added slashes to the post vars
if (VersionNumberUtility::convertVersionNumberToInteger(VersionNumberUtility::getCurrentTypo3Version()) < 7005000 && !get_magic_quotes_gpc()) {
$data = stripslashes($data);
}
$request = new tx_caretakerinstance_CommandRequest(array('session_token' => $sessionToken, 'client_info' => array('host_address' => $remoteAddress), 'data' => array(), 'raw' => $data, 'signature' => $signature));
$result = $commandService->executeCommand($request);
// TODO Check for result failure and maybe throw a HTTP status code
echo $commandService->wrapCommandResult($result);
}
} catch (Exception $exception) {
echo json_encode(array('status' => tx_caretakerinstance_CommandResult::status_undefined, 'exception' => array('code' => $exception->getCode()), 'message' => $exception->getMessage()));
}
exit;