[TYPO3-mvc] Re: Integration of TYO3 Corefeatures in Extbase

Philipp philippwrann at gmx.at
Wed Feb 20 14:49:48 CET 2013


1) I need to get records that have categories, like a simple join. But i want to know if i can do it in the repository with matchings or if i have to do direct sql instead.

I would prefere something like
$query->matching($query->has(categories,$categories))

I have to admit, i have not realized much in extbase so far.

The categorization is done with\ TYPO3\CMS\Core\Utility\ExtensionManagementUtility::makeCategorizable

jus like its ment to be i think.

My mapping in the Model should be like this i think:
/**
 * The categories of the regional object
 * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\Category>
 */
protected $categories;

But when i set this mapping extbase throws me an error because of the type

#########
My solution with the FAL problem was:
placing a underscored property in the model (to make it non-persistent) named _images
I tried @transient too, but it didnt work
Type = array

Then ive written the set/get/add methods

In my controller ive written a method called addImages
The method checks if the object implements my falfixinterface (where i define the add/set/get methods needed) and adds all the images to the _images property by making a instance of the filerepository and calling findByRelation.

Pretty simple so far, but just a workaround.

Then i created to ViewHelpers, which extend the original image ViewHelpers and get the options from the FileReference...
######


More information about the TYPO3-project-typo3v4mvc mailing list