Back to PluginAdapter class

Method setupUninstall

protected void
setupUninstall
()
Method to do any prechecks and setup the uninstall job
Returns
  • void
Since
  • 4.0.0
Class: PluginAdapter
Project: Joomla

Method setupUninstall - Source code

/**
 * Method to do any prechecks and setup the uninstall job
 *
 * @return  void
 *
 * @since   4.0.0
 */
protected function setupUninstall()
{
    // Get the plugin folder so we can properly build the plugin path
    if (trim($this->extension->folder) === '') {
        throw new \RuntimeException(Text::_('JLIB_INSTALLER_ERROR_PLG_UNINSTALL_FOLDER_FIELD_EMPTY'));
    }
    // Set the plugin root path
    $this->parent->setPath('extension_root', JPATH_PLUGINS . '/' . $this->extension->folder . '/' . $this->extension->element);
    $this->parent->setPath('source', $this->parent->getPath('extension_root'));
    $this->parent->findManifest();
    $this->setManifest($this->parent->getManifest());
    if ($this->getManifest()) {
        $this->group = (string) $this->getManifest()->attributes()->group;
    }
    // Attempt to load the language file; might have uninstall strings
    $this->loadLanguage($this->parent->getPath('source'));
}