I use a PHP based view to return XML in an Extbase extension (TYPO3 6.2). All works great except for the path of images that needs to be included in the XML.
I use the following to get the file reference:
$user->addChild('event_image', $event->getPerformance()->getEventImage());
The output in XML is:
<event_image>TYPO3\CMS\Extbase\Domain\Model\FileReference:124</event_image>
When I try to get the URL path to the image with this code
$user->addChild('event_image', $event->getPerformance()->getEventImage()->getImage()->getOriginalResource()->getPublicUrl());
I get the following error message:
Fatal error: Call to undefined method TYPO3\CMS\Extbase\Domain\Model\FileReference::getImage()
My question: How can I get the URL path from the file reference?