mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
DOC Document nullable DataObject in used on table extension guide (#9755)
This commit is contained in:
parent
e5a55a98d7
commit
4d0dc9176b
@ -43,7 +43,7 @@ class UsedOnTableExtension extends Extension
|
||||
// This extension hook will alter a DataObject after it was fetched via MyDataObject::get()
|
||||
// This allows a greater level of flexibility to exclude or modify individual DataObjects
|
||||
// It is less efficient to use this extension hook that `updateUsageExcludedClasses()` above
|
||||
public function updateUsageDataObject(DataObject $dataObject)
|
||||
public function updateUsageDataObject(?DataObject &$dataObject)
|
||||
{
|
||||
if (!($dataObject instanceof MyDataObject)) {
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user