Merge pull request #7449 from creative-commoners/pulls/4.0-updatebreadcrumbs

Add updateBreadcrumbs hook to GridFieldDetailForm
This commit is contained in:
Damian Mooyman 2017-10-11 12:17:33 +13:00 committed by GitHub
commit c3f321459b

View File

@ -587,6 +587,7 @@ class GridFieldDetailForm_ItemRequest extends RequestHandler
/** @var ArrayList $items */
$items = $this->popupController->Breadcrumbs($unlinked);
if ($this->record && $this->record->ID) {
$title = ($this->record->Title) ? $this->record->Title : "#{$this->record->ID}";
$items->push(new ArrayData(array(
@ -600,6 +601,7 @@ class GridFieldDetailForm_ItemRequest extends RequestHandler
)));
}
$this->extend('updateBreadcrumbs', $items);
return $items;
}
}