public function onBeforeDelete() { parent::onBeforeDelete(); // Clean up customisations foreach ($this->Customisations() as $customisation) { $customisation->delete(); } }