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:
Guy Sartorelli 2021-06-29 11:23:58 +12:00
parent 009a32fbec
commit 365998f445
1 changed files with 2 additions and 0 deletions

View File

@ -272,6 +272,8 @@ class GridField extends FormField
$copyConfig->addComponent(new GridFieldViewButton);
}
$copy->extend('afterPerformReadonlyTransformation', $this);
return $copy;
}