PHP code example of portrino / px_dbsequencer

1. Go to this page and download the library: Download portrino/px_dbsequencer library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

portrino / px_dbsequencer example snippets


// contextual environment settings
$applicationContext = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(
    '/',
    \TYPO3\CMS\Core\Core\Environment::getContext(),
    true
);

switch ($applicationContext[0]) {
    case 'Development':
        switch ($applicationContext[1]) {
            case 'Staging':
                // TYPO3_CONTEXT: Development/Staging
                $GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['px_dbsequencer']['system'] = 2;
                break;
            case 'Local':
                // TYPO3_CONTEXT: Development/Local
                $GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['px_dbsequencer']['system'] = 3;
                break;
        }
        break;
    case 'Production':
        $GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['px_dbsequencer']['system'] = 1;
        break;
}