[TYPO3-mvc] own sorting with extbase

Alexander Averbukh alav at gmx.net
Fri Jan 24 14:50:24 CET 2014


no, I need no array, but on object of Tx_Extbase_Persistence_QueryResultInterface

if I do:

$sorting = array('3', '1', '2', '7', '8', '5')
$query = $this->createQuery();
$query->getQuerySettings()->setRespectStoragePage(FALSE);
$query->matching($query->in('uid', $sorting));
$results = $query->execute(); 

$sorted = mySortFunction($results->toArray());

return $sorted:

I get the follow exception:

#1: PHP Catchable Fatal Error: Argument 1 passed to Tx_News_ViewHelpers_Widget_PaginateViewHelper::render() must implement interface TYPO3\CMS\Extbase\Persistence\QueryResultInterface, array given in D:\xampp\htdocs\t3\typo3conf\ext\news\Classes\ViewHelpers\Widget\PaginateViewHelper.php line 66 


More information about the TYPO3-project-typo3v4mvc mailing list