PHP code example of b13 / otf

1. Go to this page and download the library: Download b13/otf 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 / otf example snippets




defined('TYPO3') or die();

\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\B13\Otf\Tca\Registry::class)
    ->registerFields(
        new \B13\Otf\Tca\Configuration('fe_users',
            new \B13\Otf\Tca\Field('username'),
            new \B13\Otf\Tca\Field('email')
        )
    );



defined('TYPO3') or die();

\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\B13\Otf\Tca\Registry::class)
    ->registerFields(
        new \B13\Otf\Tca\Configuration('fe_users',
            (new \B13\Otf\Tca\Field('email'))->addEvaluations('uniqueInPid', 'email')
        )
    );

'aField' => [
    'label' => 'aField',
    'config' => [
        'type' => 'input',
        'eval' => 'trim,     ]
        ]
    ]
]