.. include:: ../Includes.rst.txt ====== Models ====== The Anthology extension is designed to be a generic tool for displaying records from any database table. To achieve this, you must explicitly tell the extension which model you want it to work with. The :doc:`../QuickStart/Index` guide provides a brief overview, whilst this guide explains the concepts in more detail. Making a model available involves three key parts: the TCA, the Repository, and the TypoScript configuration. The TCA File ============ At a minimum, you need a :samp:`ctrl` section in your TCA file with a :samp:`title`. This title is what will appear in the plugin's "Model name" selection box. Here is a minimal example for a hypothetical table named :samp:`tx_myextension_domain_model_item`: **Configuration/TCA/tx_myextension_domain_model_item.php** .. code-block:: php [ 'title' => 'My Extension Items', 'label' => 'title', 'tstamp' => 'tstamp', 'crdate' => 'crdate', // ... other necessary ctrl properties 'iconfile' => 'EXT:my_extension/Resources/Public/Icons/Item.svg', ], // ... rest of your TCA ... ]; The Repository ============== To fetch the data from your table, the Anthology extension needs a corresponding Extbase repository. This repository **must** have the :php:`LiquidLight\Anthology\Attribute\AsAnthologyRepository` attribute with the corresponding TCA/table name argument. **Classes/Domain/Repository/ItemRepository.php** .. code-block:: php