mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR Updated GridFieldDetailForm naming
This commit is contained in:
parent
24815ce020
commit
2ec9de1e59
@ -308,11 +308,11 @@ Here is an example in full. The actual implementation of the view and edit form
|
|||||||
|
|
||||||
public function handleItem($gridField, $request) {
|
public function handleItem($gridField, $request) {
|
||||||
$record = $gridField->getList()->byId($request->param("ID"));
|
$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 $gridField;
|
||||||
protected $component;
|
protected $component;
|
||||||
protected $record;
|
protected $record;
|
||||||
|
@ -55,7 +55,7 @@ class GridFieldDetailForm implements GridField_URLHandler {
|
|||||||
*
|
*
|
||||||
* @param type $gridField
|
* @param type $gridField
|
||||||
* @param type $request
|
* @param type $request
|
||||||
* @return GridFieldPopupForm_ItemRequest
|
* @return GridFieldDetailForm_ItemRequest
|
||||||
*/
|
*/
|
||||||
public function handleItem($gridField, $request) {
|
public function handleItem($gridField, $request) {
|
||||||
$controller = $gridField->getForm()->Controller();
|
$controller = $gridField->getForm()->Controller();
|
||||||
@ -67,7 +67,7 @@ class GridFieldDetailForm implements GridField_URLHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!$class = ClassInfo::exists(get_class($this) . "_ItemRequest")) {
|
if(!$class = ClassInfo::exists(get_class($this) . "_ItemRequest")) {
|
||||||
$class = 'GridFieldPopupForm_ItemRequest';
|
$class = 'GridFieldDetailForm_ItemRequest';
|
||||||
}
|
}
|
||||||
|
|
||||||
$handler = Object::create($class, $gridField, $this, $record, $controller, $this->name);
|
$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
|
* The opposite of {@link Controller::curr()}, required because
|
||||||
* Controller::$controller_stack is not directly accessible.
|
* Controller::$controller_stack is not directly accessible.
|
||||||
*
|
*
|
||||||
@ -281,7 +281,7 @@ class GridFieldPopupForm_ItemRequest extends RequestHandler {
|
|||||||
*/
|
*/
|
||||||
protected function getToplevelController() {
|
protected function getToplevelController() {
|
||||||
$c = $this->popupController;
|
$c = $this->popupController;
|
||||||
while($c && $c instanceof GridFieldPopupForm_ItemRequest) {
|
while($c && $c instanceof GridFieldDetailForm_ItemRequest) {
|
||||||
$c = $c->getController();
|
$c = $c->getController();
|
||||||
}
|
}
|
||||||
return $c;
|
return $c;
|
||||||
|
Loading…
Reference in New Issue
Block a user