Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This is a follow up issue for #1494124: Additional entity querying methods & Paging:
In this issue I'll implement meta controls, which allow you to sort your result.
Comment | File | Size | Author |
---|---|---|---|
#19 | 1698644-filter_and_sort5.patch | 19.42 KB | sepgil |
#14 | 1494124-querying-and-paging5.patch | 9.18 KB | sepgil |
#12 | 1698644-filter_and_sort4.patch | 15.57 KB | sepgil |
#10 | 1698644-filter_and_sort3.patch | 15.49 KB | sepgil |
#7 | 1698644-filter_and_sort2.patch | 15.39 KB | sepgil |
Comments
Comment #1
klausiComment #2
sepgil CreditAttribution: sepgil commentedFor this issue I had to change some stuff I implemented in patch of the issue #1697514: Querying - Filters. Therefore I'm merging this two issues together and will deliver one patch for both issues.
Comment #3
sepgil CreditAttribution: sepgil commentedComment #5
klausiConstants should be all upper case.
So we can't use array as constants. Better define a function that returns an array with all meta control keys?
double space
please specify the type for all parameters
$parameters is changed by getMetaControls(), I don't like that. Let's use just one function that splits $parameters up.
doesn't exist
remove the .xml extension here to also cover the accept headers alone.
type is array
additional URL parameters
Comment #6
sepgil CreditAttribution: sepgil commentedFixed the issues mentioned above.
Comment #7
sepgil CreditAttribution: sepgil commentedHeres another attempt to post my patch ... -.-
Comment #8
sepgil CreditAttribution: sepgil commentedAdding the minstrelsy disappearing GSoC tag again...
Comment #9
klausihard limit variable of 100 items is missing
that is not a constant anymore, reference the function here
catch() should be on a new line
passing objects by reference does not make sense. They are references in PHP already.
not true anymore, the meta controls are also in it?
use isset() instead, which is faster.
should end with a ".". And please add a comment that this is related to querying.
Comment #10
sepgil CreditAttribution: sepgil commentedFixed the issues mentioned above.
Comment #11
klausishould be user.json, right?
Should mention the variable name to override this
should be "these"
sorting by tid does not make sense, better use the term name?
space before and after "=>"
debug statement?
Otherwise I think this is ready.
Comment #12
sepgil CreditAttribution: sepgil commentedThe normal output without sort is already ordered after term name, so that would make no sense either.
I corrected all other issues.
Comment #13
sepgil CreditAttribution: sepgil commentedCorrected some other code style issues.
Comment #14
sepgil CreditAttribution: sepgil commentedHere is the patch...
Comment #16
klausisome old patch?
Comment #17
sepgil CreditAttribution: sepgil commentedWrong patch, this the real one :P
Comment #18
sepgil CreditAttribution: sepgil commentedComment #19
sepgil CreditAttribution: sepgil commentedI'm having problems with my internet connection...
Comment #20
klausiCommitted, thanks!