diff --git a/docs/en/topics/grid-field.md b/docs/en/topics/grid-field.md index 9e6c6f505..b9def9bd9 100644 --- a/docs/en/topics/grid-field.md +++ b/docs/en/topics/grid-field.md @@ -308,11 +308,11 @@ Here is an example in full. The actual implementation of the view and edit form public function handleItem($gridField, $request) { $record = $gridField->getList()->byId($request->param("ID")); - return new GridFieldPopupForm_ItemRequest($gridField, $this, $record); + return new GridFieldDetailForm_ItemRequest($gridField, $this, $record); } } - class GridFieldPopupForm_ItemRequest extends RequestHandler { + class GridFieldDetailForm_ItemRequest extends RequestHandler { protected $gridField; protected $component; protected $record; diff --git a/forms/gridfield/GridFieldDetailForm.php b/forms/gridfield/GridFieldDetailForm.php index 6b9a1a3df..6ff7e86a2 100755 --- a/forms/gridfield/GridFieldDetailForm.php +++ b/forms/gridfield/GridFieldDetailForm.php @@ -55,7 +55,7 @@ class GridFieldDetailForm implements GridField_URLHandler { * * @param type $gridField * @param type $request - * @return GridFieldPopupForm_ItemRequest + * @return GridFieldDetailForm_ItemRequest */ public function handleItem($gridField, $request) { $controller = $gridField->getForm()->Controller(); @@ -67,7 +67,7 @@ class GridFieldDetailForm implements GridField_URLHandler { } if(!$class = ClassInfo::exists(get_class($this) . "_ItemRequest")) { - $class = 'GridFieldPopupForm_ItemRequest'; + $class = 'GridFieldDetailForm_ItemRequest'; } $handler = Object::create($class, $gridField, $this, $record, $controller, $this->name); @@ -122,7 +122,7 @@ class GridFieldDetailForm implements GridField_URLHandler { } } -class GridFieldPopupForm_ItemRequest extends RequestHandler { +class GridFieldDetailForm_ItemRequest extends RequestHandler { /** * @@ -273,7 +273,7 @@ class GridFieldPopupForm_ItemRequest extends RequestHandler { } /** - * Traverse up nested requests until we reach the first that's not a GridFieldPopupForm_ItemRequest. + * Traverse up nested requests until we reach the first that's not a GridFieldDetailForm_ItemRequest. * The opposite of {@link Controller::curr()}, required because * Controller::$controller_stack is not directly accessible. * @@ -281,7 +281,7 @@ class GridFieldPopupForm_ItemRequest extends RequestHandler { */ protected function getToplevelController() { $c = $this->popupController; - while($c && $c instanceof GridFieldPopupForm_ItemRequest) { + while($c && $c instanceof GridFieldDetailForm_ItemRequest) { $c = $c->getController(); } return $c;