Skip to content

Latest commit

 

History

History
23 lines (18 loc) · 854 Bytes

extending.md

File metadata and controls

23 lines (18 loc) · 854 Bytes

Add your own storage backend

Disclaimer: Adding your own storage backend is possible but not recommended (yet). Until we're sure the StorageInterface is stable, changes are likely. If you've got a use case, please feel free to open an issue/PR.

If you want to have a go:

  1. Add a new storage class implementing the StorageInterface.

  2. Add a new factory class implementing the StorageFactoryInterface that can create a new instance of your storage class.

  3. Use the storage backend in your group definition:

    $GLOBALS['TL_DCA']['tl_content']['fields']['accordion'] = [
        'inputType' => 'group',
        'storage' => 'yourStorage'
        // …
    ];

    The storage name (yourStorage) is the one that you defined when implementing StorageFactoryInterface#getName().