This makes this module's `GridFieldComponent` classes `Injectable`, and allows any future enhancements in the new abstract class to automatically apply without requiring additional changes in this module.
The class is introduced in silverstripe/framework 4.11.0 so the dependency constraint needs to be updated.
Also update docs to encourage use of dependency injection.
* (cms interface) applies default sort order to CMS ordering
This allows secondary sort ordering to be applied when it exists and when the objects have not been sorted manually
* (sort logic) adds additional checks for non DataList or unsorted cases
* Update src/GridFieldOrderableRows.php
Co-authored-by: Michal Kleiner <mk@011.nz>
Co-authored-by: Michal Kleiner <mk@011.nz>
When you want to have a GridField for a sub-relation on a relation of your DataObject you use dot notation, this breaks the functionality of GridFieldOrderableRows because in the POST request the dot is replaced by an underscore.
The previous commit (9fa9ef89) added support for the new SilverStripe 4
feature of Many Many relationships through an intermediary object. After
much head scratching and community testing, the solution was proven to
work, however had no automated tests to confirm as such. This commit
rectifies that by testing both versioned and unversioned DataObjects in
a many_many through style relationship. Some minor tidy and comments
were also added as per feedback on the functionality code changes.
Previously relationships defiend as many_many came in a special type
of RelationList - however now this can be one of two types of
RelationList depending on the type of definition, with both being
valid many_many relationships.
This had the unfortunate side effect of seeing the OrderableRows
component in (the least) cease functioning correctly. No longer.
This also has the fortunate bonus of allowing a many_many relationship to
be versioned; where previously while each item in the relationship could
be versioned, the relationship itself could not.
* Fixed GridFieldOrderableRows issue when data class is Versioned and relation is has_many
* just compare table names rather than updating existing getSortTable() func
* Fixed GridFieldOrderableRows issue when data class is Versioned and relation is has_many
* just compare table names rather than updating existing getSortTable() func