.. ================================================== .. FOR YOUR INFORMATION .. -------------------------------------------------- .. -*- coding: utf-8 -*- with BOM. .. include:: ../../Includes.txt .. _developers_methods_refresh: Refresh ======= .. _methods_refresh_getT3version: getT3version() -------------- What does it do? ^^^^^^^^^^^^^^^^ Returns the current TYPO3 version. Header ^^^^^^ .. code:: php /** * Returns the current TYPO3 version. * * @return integer TYPO3 version. Format like 6002030 in case of TYPO3 6.2.30 * @access public */ public static function getT3version() Sample ^^^^^^ .. code:: php switch( true ) { case(Netzmacher\Refresh\Compatibility\Refresh::getT3version() <= 7006999): // Do something, which is compatible with TYPO3 7.6 or below return; case(Netzmacher\Refresh\Compatibility\Refresh::getT3version() >= 7007000): default: // Do something, which is compatible with TYPO3 7.7 or higher return; } Refresh ^^^^^^^ If you are using switches depending on TYPO versions, you can replace your code with the code from bove. getT3version() is independent on TYPO3 versions.