Support #34765

Set the default orderings from outside

Added by Adrian Föder over 9 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Start date:
2012-03-12
Due date:
% Done:

0%

Estimated time:

Description

I need support, please :)

The repository has the default orderings set in its repository class,

class CommentRepository extends \TYPO3\FLOW3\Persistence\Repository {

    /**
     * @var array
     */
    protected $defaultOrderings = array('creationDate' => \TYPO3\FLOW3\Persistence\QueryInterface::ORDER_DESCENDING); 
...
?>

how is it possible to overwrite this from outside? Maybe it must even be substituted to a variant that allows setting this via Objects.yaml; but that I don't know surely.


Related issues

Related to TYPO3.Flow - Feature #42539: Allow Object.yaml property value to be also an arrayResolvedAdrian Föder2012-10-31

Actions
#1

Updated by Adrian Föder over 8 years ago

  • Status changed from Needs Feedback to Closed

can be resolved with core patch #42539.

#2

Updated by Bastian Waidelich over 8 years ago

Hey Adrian,

you won't need a core patch, just override the ordering via

$this->commentRepository->setDefaultOrderings();

HTH

#3

Updated by Bastian Waidelich over 8 years ago

Bastian Waidelich wrote:

you won't need a core patch, just override the ordering via

Nevermind, you probably wanted to change it from *outside of the comment package", right? and the core patch is already merged anyways

#4

Updated by Adrian Föder over 8 years ago

Bastian Waidelich wrote:

Nevermind, you probably wanted to change it from *outside of the comment package", right? and the core patch is already merged anyways

yes, and, yes. That's why I closed it ;)

Also available in: Atom PDF