mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Added support to DataObject::relObject() for looking at $casting to get information about the relation - good for dynamic relations
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@66582 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
916df369d8
commit
b877ddb546
@ -2020,6 +2020,8 @@ class DataObject extends ViewableData implements DataObjectInterface,i18nEntityP
|
||||
$component = singleton($rel);
|
||||
} elseif ($rel = $component->many_many($relation)) {
|
||||
$component = singleton($rel[1]);
|
||||
} elseif($info = $this->castingHelperPair($relation)) {
|
||||
$component = singleton($info['className']);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user