Refresh¶
getT3version()¶
What does it do?¶
Returns the current TYPO3 version.
Header¶
/**
 * 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¶
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.