silverstripe-framework/docs/en/02_Developer_Guides/15_Customising_the_Admin_Interface/How_Tos/Extending_An_Existing_ModelAdmin.md
David Alexander 903379bde2 DOCS 3.2 : fixing api: links now that api: tag parser working
fixed a couple of external links

fixed a docs link
2016-02-17 18:02:38 -07:00

23 lines
662 B
Markdown

## Extending existing ModelAdmin
Sometimes you'll work with ModelAdmins from other modules. To customize these interfaces, you can always subclass. But there's
also another tool at your disposal: The [api:Extension] API.
:::php
class MyAdminExtension extends Extension {
// ...
public function updateEditForm(&$form) {
$form->Fields()->push(/* ... */)
}
}
Now enable this extension through your `[config.yml](/topics/configuration)` file.
:::yml
MyAdmin:
extensions:
- MyAdminExtension
The following extension points are available: `updateEditForm()`, `updateSearchContext()`,
`updateSearchForm()`, `updateList()`, `updateImportForm`.