TYPO3 Flow Base DistributionPackagesApplications

Support #34765

Set the default orderings from outside

Added by Adrian Föder over 3 years ago. Updated over 2 years ago.

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

0%

Category:-
Target version:-

Description

I need support, please :)

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

1class CommentRepository extends \TYPO3\FLOW3\Persistence\Repository {
2
3    /**
4     * @var array
5     */
6    protected $defaultOrderings = array('creationDate' => \TYPO3\FLOW3\Persistence\QueryInterface::ORDER_DESCENDING); 
7...
8?>

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 array Resolved 2012-10-31

History

#1 Updated by Adrian Föder over 2 years ago

  • Status changed from Needs Feedback to Closed

can be resolved with core patch #42539.

#2 Updated by Bastian Waidelich over 2 years ago

Hey Adrian,

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

1$this->commentRepository->setDefaultOrderings();

HTH

#3 Updated by Bastian Waidelich over 2 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 2 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