Silverstripe Version: 4.9
Question: Hey,
I’m trying to add a search bar to archived records for a given data object class. I already have an extension working that contains a updateEditForm action that is called when the list of archived objects is opened, but I have no idea how to add a search function to that list.
class ArchiveAdminExtension extends Extension
{
public function updateEditForm(&$form)
{
if ($this->owner->modelClass === MyClass::class) {
$field = new SilverStripe\Forms\GridField\GridFieldFilterHeader();
// how to add this filter header to the page?
if ($GridField = $form->Fields()->dataFieldByName('Others')) {
if ($Header = $GridField->getConfig()->getComponentByType(GridFieldDataColumns::class)) {
}
}
}
return $form->Fields();
}
}