FIX Swap DataList code to SS_List

And remove a reference to a DataList method to rely on the GridField method
instead
This commit is contained in:
Marcus Nyeholt 2016-10-12 17:24:20 +11:00
parent 50ffec51e4
commit d72288125a
1 changed files with 2 additions and 2 deletions

View File

@ -143,7 +143,7 @@ class GridFieldOrderableRows extends RequestHandler implements
* @param DataList $list
* @return string
*/
public function getSortTable(DataList $list) {
public function getSortTable(SS_List $list) {
$field = $this->getSortField();
if($list instanceof ManyManyList) {
@ -219,7 +219,7 @@ class GridFieldOrderableRows extends RequestHandler implements
}
public function getColumnMetadata($grid, $col) {
if ($fieldLabels = singleton($grid->list->dataClass)->fieldLabels()) {
if ($fieldLabels = singleton($grid->getModelClass())->fieldLabels()) {
return array('title' => isset($fieldLabels['Reorder']) ? $fieldLabels['Reorder'] : '');
}