PHP code example of fbit / fbit-berecordlist

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

    

fbit / fbit-berecordlist example snippets


$GLOBALS['TYPO3_CONF_VARS']['EXT']['fbit_berecordlist']['modules']['YOUR_EXTKEY'] = [
    'icon' => 'EXT:your_extkey/Resources/Public/Icons/your_module_icon.svg',
    'labels' => 'LLL:EXT:your_extkey/Resources/Private/Language/locallang_mod_yourmodll.xlf',
    'storagePid' => '(provide a single page uid as an integer here)',
    'tables' => [
        'tx_yourext_domain_model_name' => true,
        'tx_yourext_domain_model_name2' => [
            'allowedRecordTypes' => [
                '(integer value of allowed record type, see the table\'s TCA type column configuration and items)'
            ],
            'displayFields' => [
                // Items in this array will override any preset displayFields (either set by TCA or field selection
                // below the recordlist.
                //
                // You may either enter a fieldname and set it to true to simply display its column and value for each
                // record or you can assign an array to the fieldname containing the item
                // "displayProcFunc" => "Classname->methodname" to invoke a user-defined method which transforms the
                // record's column value.
                'fieldname' => true,
                // The parameters passed to the displayProcFunc are: $tablename, $recordUid, $fieldname, $columnValue.
                // $columnValue should be taken as a reference. It contains the (HTML) text content which is rendered
                // in the record list table column row of the current record. You may use HTML in your transformed
                // value. Be vigilant about UTF8 - you might have to utf8_decode your content string to avoid encoding
                // issues in the output.
                'fieldname2' => [
                    'displayProcFunc' => 'Classname->methodname',
                ],
            ],
        ],
    ],
    // leave empty to use the default "fbit" main module
    'mainModule' => 'your_main_module_key',
    'moduleLayout' => [
        'header' => [
            'enabled' => true,
            'menu' => [
                'showOneOptionPerTable' => true,
                'showOneOptionPerRecordType' => true,
            ],
            'pagepath' => false,
            'buttons' => [
                'enabled' => true,
                'left' => [
                    'actions-document-new' => false,
                    'actions-page-open' => false,
                    'actions-document-export-csv' => false,
                    'actions-document-export-t3d' => false,
                    // override icon using another registered icon identifier
                    'actions-search' => [
                        'icon' => 'actions-filter'
                    ],
                ],
                'right' => [
                    'actions-system-cache-clear' => false,
                    'actions-refresh' => false,
                    // the following two can not have their icon changed
                    'shortcut' => false,
                    'csh' => false,
                ],
                // You MUST provide every button that will be in the buttons bar after all operations,
                // including the generation of new buttons based on table or record type and the removal
                // of buttons based on the settings above.
                //
                // If the deep count of button identifiers in the sorting array is not exactly equal to the
                // deep count of available buttons, no sorting will be done.
                //
                // Be aware that the sorting also has to