Back to TemplateAdapter 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()
{
    // Remove files
    $this->parent->removeFiles($this->getManifest()->media);
    $this->parent->removeFiles($this->getManifest()->languages, $this->extension->client_id);
    // Delete the template directory
    if (Folder::exists($this->parent->getPath('extension_root'))) {
        Folder::delete($this->parent->getPath('extension_root'));
    } else {
        Log::add(Text::_('JLIB_INSTALLER_ERROR_TPL_UNINSTALL_TEMPLATE_DIRECTORY'), Log::WARNING, 'jerror');
    }
}