PHP code example of nemo64 / typo3api

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

    

nemo64 / typo3api example snippets


\Typo3Api\Builder\TableBuilder::create('tx_ext_person')
    ->configure(new \Typo3Api\Tca\LanguageConfiguration())
    ->configure(new \Typo3Api\Tca\EnableColumnsConfiguration())
    ->configure(new \Typo3Api\Tca\SortingConfiguration())

    // configure cache clearing so you don't need to provide cache clear capabilities to your backend users
    ->configure(new \Typo3Api\Tca\CacheTagConfiguration('tx_ext_person_###UID###'))
    ->configure(new \Typo3Api\Tca\CacheTagConfiguration('tx_ext_person'))

    // the actual fields
    ->configure(new \Typo3Api\Tca\Field\InputField('first_name', ['ngConfiguration())
            ->configure(new \Typo3Api\Tca\Field\SelectField('type', ['values' => ['business', 'private', 'other']]))
            ->configure(new \Typo3Api\Tca\Field\PhoneField('value'))
    ]))

    // use or create complex configurations and reuse them across tables
    ->configure(new \Typo3Api\Tca\Util\Address('Address'))

    // create new tabs (aka --div--) on the fly
    ->configureInTab('Notice', new \Typo3Api\Tca\Field\TextareaField('notice'))
;

\Typo3Api\Builder\TableBuilder::create('tt_content', 'carousel')
    ->configure(new \Typo3Api\Tca\ContentElementConfiguration())
    // add more fields as you like
;

\Typo3Api\Builder\TableBuilder::create('tt_content', 'quote')
    ->configure(new \Typo3Api\Tca\ContentElementConfiguration([
        'name' => 'Quote element',
        'description' => 'Tell what other peaple are saying',
        'icon' => 'content-quote',
        'headline' => 'hidden', // adds only the headline field
    ]))
;