mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@77455 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
8282a61ddf
commit
9207cbc2da
@ -26,9 +26,7 @@ class WidgetAreaEditor extends FormField {
|
|||||||
|
|
||||||
function UsedWidgets() {
|
function UsedWidgets() {
|
||||||
$relationName = $this->name;
|
$relationName = $this->name;
|
||||||
|
$widgets = $this->form->getRecord()->getComponent($relationName)->Widgets();
|
||||||
$widgets = $this->form->getRecord()->$relationName()->Widgets();
|
|
||||||
|
|
||||||
return $widgets;
|
return $widgets;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -38,14 +36,14 @@ class WidgetAreaEditor extends FormField {
|
|||||||
|
|
||||||
function Value() {
|
function Value() {
|
||||||
$relationName = $this->name;
|
$relationName = $this->name;
|
||||||
return $this->form->getRecord()->$relationName()->ID;
|
return $this->form->getRecord()->getComponent($relationName)->ID;
|
||||||
}
|
}
|
||||||
|
|
||||||
function saveInto(DataObject $record) {
|
function saveInto(DataObject $record) {
|
||||||
$name = $this->name;
|
$name = $this->name;
|
||||||
$idName = $name . "ID";
|
$idName = $name . "ID";
|
||||||
|
|
||||||
$widgetarea = $record->$name();
|
$widgetarea = $record->getComponent($name);
|
||||||
$widgetarea->write();
|
$widgetarea->write();
|
||||||
|
|
||||||
$record->$idName = $widgetarea->ID;
|
$record->$idName = $widgetarea->ID;
|
||||||
|
Loading…
Reference in New Issue
Block a user