[TYPO3-mvc] tt_content FAL in own extension
Stefan Kruse
besucher80 at gmx.de
Fri Jun 6 07:55:57 CEST 2014
Hi,
i try to read out the tt_content records out of my own extension.
I create a model with all the properties and getters/setters. Then i mapped the model to the tt_content table.
To this step everything works fine, i can read out the records from the tt_content table. BUT:
I dont get the images they are created with FAL. In my model i have this:
/**
* Image
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference>
*/
protected $image;
/**
* Returns the image
*
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $image
*/
public function getImage() {
return $this->image;
}
/**
* Sets the image
*
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $image
* @return void
*/
public function setImage($image) {
$this->image = $image;
}
Ok, when i now make a debug output from my fetched tt_content records then i see the follow:
images => TYPO3\CMS\Extbase\Persistence\ObjectStorageprototypeobject (1 items)
...0000000004902dc8000000003d176148 => TYPO3\CMS\Extbase\Domain\Model\FileReferenceprototypepersistent entity (uid=1, pid=5)
.......fileRepository => TYPO3\CMS\Core\Resource\FileRepositorysingletonobject
........... originalResource => NULL
........... uid => 1 (integer)
........... _localizedUid => 1 (integer)modified
........... _languageUid => 0 (integer)modified
........... pid => 5 (integer)
The field originalResource is always empty. It thinks this is not right or is it?
How can i read out the images correctly? It would be very nice if somebody has a tip. Thanks a lot. Stefan
More information about the TYPO3-project-typo3v4mvc
mailing list