Beispiel #1
0
 /**
  * Uninstall a plugin.  
  *
  * This will run the 'uninstall' hook for the given plugin, and then it
  * will remove the entry in the DB corresponding to the plugin.
  * 
  * @param Plugin $plugin Plugin to uninstall.
  * @throws Omeka_Plugin_Loader_Exception
  * @return void
  */
 public function uninstall(Plugin $plugin)
 {
     if (!$plugin->isLoaded()) {
         // Flag the plugin as active so we can load the 'uninstall' hook.
         $plugin->setActive(true);
         // Load the plugin files, die if can't be loaded.
         $this->_loader->load($plugin, true);
     }
     $this->_broker->callHook('uninstall', array(), $plugin);
     $plugin->delete();
 }