mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-09-06 01:31:09 +02:00
API CHANGE #4036 ajshort: Add the ability to set the keys of ModelAdmin::$managed_models to alternate titles for the tabs.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@76998 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
4adb585e80
commit
405392f7f7
@ -191,9 +191,9 @@ abstract class ModelAdmin extends LeftAndMain {
|
|||||||
$models = $this->getManagedModels();
|
$models = $this->getManagedModels();
|
||||||
$forms = new DataObjectSet();
|
$forms = new DataObjectSet();
|
||||||
|
|
||||||
foreach($models as $class) {
|
foreach($models as $title => $class) {
|
||||||
$forms->push(new ArrayData(array (
|
$forms->push(new ArrayData(array (
|
||||||
'Title' => singleton($class)->singular_name(),
|
'Title' => (is_string($title) ? $title : singleton($modelClass)->singular_name()),
|
||||||
'ClassName' => $class,
|
'ClassName' => $class,
|
||||||
'Content' => $this->$class()->getModelSidebar()
|
'Content' => $this->$class()->getModelSidebar()
|
||||||
)));
|
)));
|
||||||
|
Loading…
Reference in New Issue
Block a user