當前位置: 首頁>>代碼示例>>PHP>>正文


PHP VersionNumberUtility::getCurrentTypo3Version方法代碼示例

本文整理匯總了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;
 }
開發者ID:helhum,項目名稱:realurl,代碼行數:19,代碼來源:AdministrationModuleFunction.php

示例2: getInstalledVersion

 /**
  * Get current installed version number
  *
  * @return string
  */
 public function getInstalledVersion()
 {
     return VersionNumberUtility::getCurrentTypo3Version();
 }
開發者ID:dachcom-digital,項目名稱:TYPO3.CMS,代碼行數:9,代碼來源:CoreVersionService.php

示例3: useCompatibility6

 private static function useCompatibility6()
 {
     return version_compare(\TYPO3\CMS\Core\Utility\VersionNumberUtility::getCurrentTypo3Version(), '7.6.0', '<');
 }
開發者ID:r3h6,項目名稱:TYPO3.EXT.error404page,代碼行數:4,代碼來源:CustomPageUtility.php

示例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');
開發者ID:r3h6,項目名稱:TYPO3.EXT.error404page,代碼行數:20,代碼來源:ext_tables.php

示例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;
開發者ID:ohartwig,項目名稱:caretaker_instance,代碼行數:31,代碼來源:eid.tx_caretakerinstance.php


注:本文中的TYPO3\CMS\Core\Utility\VersionNumberUtility::getCurrentTypo3Version方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。