Feature #66623
closed
- Status changed from New to Needs Feedback
The whole DataMapper is internal and will likely stay that way. Can you maybe rephrase the ticket to articulate what you want to achieve and why?
I used the DataMapper to build an object of the data array already available by an extbase content element.
In the meantime DataProcessors are available and are perfect for simple content elements with not that complex content elements.
But for more complex content elements build with Extbase it's helpfull to get the content element as an object.
Using `\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper->map` prevents an additional sql query as the data of the CE is already fetched and you don't need a repository class for the CE.
The DataMapper was marked internal on 1 Oct 2018, long after the issue was created:
https://github.com/TYPO3/TYPO3.CMS/commit/65a5511149dbabeb58fc86d9c4f66188ea040d90#diff-a8aa95385a4a9a2e39c52f857dbc0e28R21
- Tracker changed from Task to Feature
- Status changed from Needs Feedback to New
Ok, got the case.
Not sure if the DataMapper of Extbase would be the way to go or some more generic array-to-object mapper which could be integrated in the core but one way or the other, the use case is valid.
(Yes, I know that the whole class was marked internal by annotation last year, but extbase was one part which used @api to annotate public api instead of the other way around before that IIRC)
- Sprint Focus set to Needs Decision
- Status changed from New to Needs Feedback
- Status changed from Needs Feedback to Closed
Hey.
I hope we don't disturb anyone by closing the issue for now: It seems unlikely the DM in extbase is reworked for now and there haven't been many changes for years as Stefan said. As far as I can see, map() does not fire DB calls / anymore? If this is a pressing issue, we could still make the method public. Let's do that in a fresh issue in case this is still an issue.
Also available in: Atom
PDF