This package is abandoned and no longer maintained. No replacement package was suggested.

TYPO3 utility belt

v1.2.1 2016-01-29 10:50 UTC

This package is not auto-updated.

Last update: 2023-11-23 16:11:09 UTC


#TYPO3 Utils

Latest Stable Version License

Utility classes to provide simpler APIs to common TYPO3 tasks.


You can include this library in any of your TYPO3 extensions via Composer:

$ composer require "3ev/typo3-utils"


TYPO3 Utils provides the following utility classes to help ease building TYPO3 extensions:


This namespace provides a few useful traits for re-usable model functionality, such as adding getters and setters for crdate, tstamp and hidden.


This namespace contains 'generators', which are wrappers around TYPO3's DataHandler API.

Generators can be used to create page, content and template and records from the backend or CLI scripts (a BE_USER is required).

####Tev\Typo3Utils\Hook\EntityHook & Tev\Typo3Utils\Hook\EntityRegistrar

The EntityHook and EntityRegistrar classes make it easy to listen to backend TYPO3 lifecycle events on database entities.

Just extend EntityHook, and specify the table you want to listen to in the parent constructor. You'll then be able to implement creating, created, updating, updated, saving, saved and deleted methods as you wish, which will be called when the relevant action happens from the TYPO3 backend.

You can register your hook class by simply adding:


to your extension's ext_tables.php file. This saves you writing a complex TYPO3 hook definition.


The default TYPO3 log file writer doesn't let you write to log files outside of the publicly served directory.

This can be insecure, so this simple writer class allows you to write log files anywhere on the filesystem.


This class makes it trivial to register wizicons for plugins in your extension.

Just extend the base wizicon class and configure the icon details in the parent constructor:

namespace My\Extension;

class MyIcon extends \Tev\Typo3Utils\Plugin\WizIcon
    public function __construct()
            // Your extension's name, with underscores


            // The plugin name(s) you'd like the wizicon to be used for

            ['myplugin', 'myotherplugin],

            // Optional. The icon file name


            // Optional. The language file you'd like to use


then, just register the icon class as normal in ext_tables.php:

if (TYPO3_MODE === 'BE') {
    $TBE_MODULES_EXT['xMOD_db_new_content_el']['addElClasses']['My\\Extension\\WizIcon'] =
        \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Classes/WizIcon.php';


This class provides an Extbase-compatible wrapper around the Geocoder PHP library.


This utility class provides a TCA userfunc to allow you to set labels consisting of multiple fields, with a custom separator.

For example:

'crtl' => [
    'label_userFunc' => 'Tev\\Typo3Utils\\TCA\\Label->run',
    'label_userFunc_options' => [
        // Required, single field name of array of field names

        'fields' => [

        // Optional, defaults to ' '

        'glue' => ', '


This class provides a few utilities for dumping out data. Currently, the only available method allows you to dump a an Extbase query object so that you can examine the query being generated and run.


This class provides a simple API for accessing extconf variables:

$conf = new \Tev\Typo3Utils\Utility\ExtConf('my_ext');


This class provides a few methods for retrieving data on TYPO3 pages.

See the class for more information.


This class provides a simple API for initialising the TSFE on the CLI or TYPO3 backend. You just need to set the root page ID an optionally provide a host name:

$tsfe = \Tev\Typo3Utils\Utility\Tsfe;
$tsfe->create(1 /*, www.hostname.com */);


MIT © 3ev