Fromholdio\Sortable\Extensions\Sortable
Assumes sort field is named 'Sort' and so creates the db field, and applies a default_sort from this. You can use $sortable_field_name to set a different sort field, but you will need to create the db field and override the $default_sort.
Synopsis
class Sortable
extends DataExtension
{
- // members
- private static array $db = ;
- private static string $default_sort = 'Sort';
- private static string $sortable_field_name = 'Sort';
- // methods
- public void updateCMSFields()
- public void onBeforeWrite()
- public void getSortableFieldName()
Hierarchy
Extends
- SilverStripe\ORM\DataExtension
Members
private
- $db
- $default_sort
- $sortable_field_name