mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
ENH Add extension point for modifying readonly GridFields.
Developers may want to amend a gridfield (either by modifying its components or amending the list) after it has been transformed to be readonly. One such modification may be replacing the GridFieldViewButton with something else - because components are instantiated with the "new" keyword this would be the only way to do that.
This commit is contained in:
parent
009a32fbec
commit
365998f445
@ -272,6 +272,8 @@ class GridField extends FormField
|
||||
$copyConfig->addComponent(new GridFieldViewButton);
|
||||
}
|
||||
|
||||
$copy->extend('afterPerformReadonlyTransformation', $this);
|
||||
|
||||
return $copy;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user