mirror of
https://github.com/symbiote/silverstripe-gridfieldextensions.git
synced 2024-10-22 17:05:39 +02:00
Merge branch '2.0' into 2
This commit is contained in:
commit
fbc7278378
@ -9,9 +9,16 @@ class GridFieldAddNewMultiClassHandler extends GridFieldDetailForm_ItemRequest {
|
||||
return parent::Link($action);
|
||||
} else {
|
||||
return Controller::join_links(
|
||||
$this->gridField->Link(), 'add-multi-class', get_class($this->record)
|
||||
$this->gridField->Link(), 'add-multi-class', $this->sanitiseClassName(get_class($this->record))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sanitise a model class' name for inclusion in a link
|
||||
* @return string
|
||||
*/
|
||||
protected function sanitiseClassName($class) {
|
||||
return str_replace('\\', '-', $class);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user