You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The title ($gridField->Title()) is more likely to be human-readable than the name - e.g. ModelAdmin generates a sanitised version of the FQCN of the DataObject.
The text was updated successfully, but these errors were encountered:
@kinglozzer
GridField::title is currently a protected field, if we also added public GridField->getTitle(), remembering that title may be blank, would something like this work: 'GridName' => $gridField->getTitle() ?: $gridField->getName()
?
GridField should inherit FormField::Title() (dunno why it’s not called getTitle()!) so we do already have a method for it, I think your suggestion of falling back to getName() sounds good 👍
I believe the reason for being Title() and not getTitle() is for indicating use by, or some kind of limitation of, the view layer. Could just be a legacy thing too. 🤷♂
https://github.com/silverstripe/silverstripe-gridfieldqueuedexport/blob/2.3.0/src/Forms/GridFieldQueuedExportButton.php#L193
The title (
$gridField->Title()
) is more likely to be human-readable than the name - e.g. ModelAdmin generates a sanitised version of the FQCN of the DataObject.The text was updated successfully, but these errors were encountered: