mirror of
https://github.com/symbiote/silverstripe-gridfieldextensions.git
synced 2024-10-22 17:05:39 +02:00
Remove no longer needed property access hacks.
This commit is contained in:
parent
90ada9871e
commit
38bb120c88
@ -53,14 +53,8 @@ class GridFieldOrderableRows extends RequestHandler implements
|
|||||||
$field = $this->getSortField();
|
$field = $this->getSortField();
|
||||||
|
|
||||||
if($list instanceof ManyManyList) {
|
if($list instanceof ManyManyList) {
|
||||||
// @todo These should be publically accesible.
|
$extra = $list->getExtraFields();
|
||||||
$reflector = new ReflectionObject($list);
|
$table = $list->getJoinTable();
|
||||||
|
|
||||||
$extra = $reflector->getProperty('extraFields');
|
|
||||||
$extra->setAccessible(true);
|
|
||||||
|
|
||||||
$table = $reflector->getProperty('joinTable');
|
|
||||||
$table->setAccessible(true);
|
|
||||||
|
|
||||||
if(array_key_exists($field, $extra->getValue($list))) {
|
if(array_key_exists($field, $extra->getValue($list))) {
|
||||||
return $table->getValue($list);
|
return $table->getValue($list);
|
||||||
@ -269,13 +263,8 @@ class GridFieldOrderableRows extends RequestHandler implements
|
|||||||
}
|
}
|
||||||
|
|
||||||
if($list instanceof ManyManyList) {
|
if($list instanceof ManyManyList) {
|
||||||
$reflector = new ReflectionObject($list);
|
$extra = $list->getExtraFields();
|
||||||
|
$key = $list->getLocalKey();
|
||||||
$extra = $reflector->getProperty('extraFields');
|
|
||||||
$extra->setAccessible(true);
|
|
||||||
|
|
||||||
$key = $reflector->getProperty('localKey');
|
|
||||||
$key->setAccessible(true);
|
|
||||||
|
|
||||||
if(array_key_exists($this->getSortField(), $extra->getValue($list))) {
|
if(array_key_exists($this->getSortField(), $extra->getValue($list))) {
|
||||||
return sprintf('"%s" %s', $key->getValue($list), $value);
|
return sprintf('"%s" %s', $key->getValue($list), $value);
|
||||||
|
Loading…
Reference in New Issue
Block a user