public function uninstall()
 {
     if (!parent::uninstall() || !Configuration::delete('MOD_BLOCKHOMECATS_CATS')) {
         return false;
     }
     return true;
 }
 public function flushRoutes()
 {
     \Configuration::delete('admin_routes');
     return \Redirect::to('admin');
 }
 /**
  * Remove configuration value in database with specified key
  * #### Example
  * ```php
  * global $conf; // global var, contain configurations
  * echo $conf->remove('myNewConfigKey'); //delete myNewConfigKey from 'conf' default namespace 
  * echo $conf->remove('myNewConfigKey','myCustomPluginConfig'); //delete myNewConfigKey from 'myCustomPluginConfig' namespace
  * ```
  * @param string configuration key
  * @param string configuration namespace (default is 'conf')
  */
 public function remove($key, $ns = 'conf')
 {
     $configurationManager = new Configuration();
     if (isset($this->confTab[$ns][$key])) {
         $configurationManager->delete(array('key' => $ns . ':' . $key));
     }
     unset($this->confTab[$ns][$key]);
     unset($_SESSION['configuration']);
 }
<?php

/* 
	Le code contenu dans cette page ne sera éxecuté qu'à la désactivation du plugin 
	Vous pouvez donc l'utiliser pour supprimer des tables SQLite, des dossiers, ou executer une action
*/
require_once 'Sensor.class.php';
require_once 'SensorType.class.php';
$table = new Sensor();
$table2 = new SensorType();
$table->drop();
$table2->drop();
$conf = new Configuration();
$conf->delete(array('key' => 'plugin_sensor_receptor_pin'));
$table_section = new Section();
$id_section = $table_section->load(array("label" => "sensor"))->getId();
$id_section2 = $table_section->load(array("label" => "sensortypes"))->getId();
$table_section->delete(array('label' => 'sensor'));
$table_section2->delete(array('label' => 'sensortypes'));
$table_right = new Right();
$table_right->delete(array('section' => $id_section));
$table_right->delete(array('section' => $id_section2));