If you want your add-on to extend the API with a new entity, follow these steps:
Tygh/Api/Entitiessubdirectory in the directory of your add-on (app/addons/<add-on name>).
Tygh/Api/Entitiessubdirectory, create a file for the new entity (for example, Things.php)
In this file, define the class of the same name (
Thingsin our case) inherited from the abstract
Api\Entityclass, in the
This class must implement all 4 mandatory methods (CRUD).
This method allows you to set the privileges of unauthorized users who access this API entity.