Back to LanguageAdapter class

Method removeExtensionFiles

protected void
removeExtensionFiles
()
Removes this extension's files
Returns
  • void
Since
  • 4.0.0
-
  • \RuntimeException

Method removeExtensionFiles - Source code

/**
 * Removes this extension's files
 *
 * @return  void
 *
 * @since   4.0.0
 * @throws  \RuntimeException
 */
protected function removeExtensionFiles()
{
    $this->parent->removeFiles($this->getManifest()->media);
    // Construct the path from the client, the language and the extension element name
    $path = ApplicationHelper::getClientInfo($this->extension->client_id)->path . '/language/' . $this->extension->element;
    if (!Folder::delete($path)) {
        // If deleting failed we'll leave the extension entry in tact just in case
        Log::add(Text::_('JLIB_INSTALLER_ERROR_LANG_UNINSTALL_DIRECTORY'), Log::WARNING, 'jerror');
        $this->ignoreUninstallQueries = true;
    }
}