Back to PluginAdapter class

Method finaliseUninstall

protected bool
finaliseUninstall
()
Method to finalise the uninstallation processing
Returns
  • bool
Since
  • 4.0.0
-
  • \RuntimeException
Class: PluginAdapter
Project: Joomla

Method finaliseUninstall - Source code

/**
 * Method to finalise the uninstallation processing
 *
 * @return  boolean
 *
 * @since   4.0.0
 * @throws  \RuntimeException
 */
protected function finaliseUninstall() : bool
{
    $extensionId = $this->extension->extension_id;
    $db = $this->parent->getDbo();
    // Remove the schema version
    $query = $db->getQuery(true)->delete('#__schemas')->where('extension_id = :extension_id')->bind(':extension_id', $extensionId, ParameterType::INTEGER);
    $db->setQuery($query);
    $db->execute();
    // Now we will no longer need the plugin object, so let's delete it
    $this->extension->delete($this->extension->extension_id);
    // Remove the plugin's folder
    Folder::delete($this->parent->getPath('extension_root'));
    return true;
}
OSZAR »