g4b0\SearchableDataObjects\SearchableDataObject
SearchableDataObject - extension that let the DO to auto update the search table after a write
- Author: Gabriele Brosulo <gabriele.brosulo@zirak.it>
Synopsis
class SearchableDataObject
extends DataExtension
{
- // methods
- private void deleteDo()
- public void onAfterWrite()
- public void onBeforeDelete()
- public void augmentDatabase()
- private void findParentTable()
Hierarchy
Extends
- SilverStripe\ORM\DataExtension
Methods
private
- deleteDo()
- findParentTable() — Recursive function to find the parent table of the current data object
public
- augmentDatabase() — Check and create the required table during dev/build
- onAfterWrite()
- onBeforeDelete() — Remove the entry from the search table before deleting it