/** * onBeforeDelete event - forbids deleting the default backup profile * * @param int $oid The ID of the profile to delete * * @return boolean True if the deletion is allowed */ protected function onBeforeDelete($oid) { $result = parent::onBeforeDelete($oid); if ($result) { if ($oid == 1) { $this->setError(JText::_('TABLE_PROFILE_CANNOTDELETEDEFAULT')); $result = false; } } return $result; }