Filter fields from a resource #55
-
I need to filter out some fields from all resources returned by a given query. Which fields are to be filtered out is a dynamic information defined in the TYPO3 BE using a metadata table that defines properties of other tables (like which field of which table should be filtered out, depending on FE user rights). Since it is something dynamic, I can't rely on properties annotations in the Extbase model (not sure if they exist anyway). What would be possible ways to achieve this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi. Your question is related to serialization (normalization) process. First of all I'm leaving here link to documentation. Unfortunately we didn't have yet time to fill the section about serialization but maybe if someone read that topic in the future it will be already filled: https://docs.typo3.org/p/sourcebroker/t3api/master/en-us/Serialization/Index.html And now regarding your question - I think that there are few ways to go:
We added normalization group 1a. Additionally to first point - there might be situation when you would like to add dynamic groups. To achieve that you could use signal
Now Example usage with custom function provider: Expression Function Provider:
Entity:
|
Beta Was this translation helpful? Give feedback.
Hi. Your question is related to serialization (normalization) process.
First of all I'm leaving here link to documentation. Unfortunately we didn't have yet time to fill the section about serialization but maybe if someone read that topic in the future it will be already filled: https://docs.typo3.org/p/sourcebroker/t3api/master/en-us/Serialization/Index.html
And now regarding your question - I think that there are few ways to go:
normalizationContext
and groups. In configuration for the endpoint you can define groups which determines if property should be included in. If any group is defined innormalizationContext
then only properties with this group are includ…