PHP code example of b13 / newspage-sorting

1. Go to this page and download the library: Download b13/newspage-sorting 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/ */

    

b13 / newspage-sorting example snippets


$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass']['tx_newspage_sorting'] =
    YourVendor\YourExtension\Hooks\SortNewsOverride::class;

    protected function getCustomisableFieldsForFolder(\DateTime $date, FolderType $type): array
    {
        return [
            'title' => $date->format($type->value),
        ];
    }