[Flow] Query to get all
Rémy DANIEL
dogawaf at no-log.org
Thu Apr 2 08:55:38 CEST 2015
Hi Patrick
At each while iteration, $energiebedarfoel is set.
So at the end of the each, $energiebedarfoel is only one object.
You can:
- feed an array of Energiebedarfoel, then pass it to the view and iterate
over it with <f:for />
- or better, pass directly the queryResult to the view, and iterate
directly over it with <f:for />
Cheers
--
Rémy
2015-03-24 21:03 GMT+01:00 Patric Eckhart <mail at patriceckhart.com>:
> Thank you Rémy,
> it works but this give me only the last dataset.
>
> $classname = '\MyProject\Portal\Domain\Model\Data';
> $query = $this->persistenceManager->createQueryForType($classname);
> $results = $query->matching($query->equals('object',
> $object))->execute();
>
> while($result = $results->current()){
> $energiebedarfoel = $result->getEnergiebedarfoel();
> $results->next();
>
> }
>
> $this->view->assign('results', $energiebedarfoel);
> _______________________________________________
> Flow mailing list
> Flow at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow
>
More information about the Flow
mailing list