Skip to content

A place to put the business logic #12

Answered by kszymukowicz
Moongazer asked this question in Q&A
Discussion options

You must be logged in to vote

Support for custom endpoints with own controller is already done in branch https://github.com/sourcebroker/t3api/tree/issue-7 but needs to be yet rechecked before merging to master.

In short you need to register handler in ext_localconf.php

$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['t3api']['operationHandlers'][\V\Myext\OperationHandler\Operation1Handler::class] = 100;
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['t3api']['operationHandlers'][\V\Myext\OperationHandler\Operation2Handler::class] = 100;

The 100 is priority if there is more implementation of the same endpoint.

Then create a model for business logic (in this model you will define possible endpoints with annotations)
(Classes/Domain/Mo…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by kszymukowicz
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #12 on December 30, 2020 21:11.