Back to PluginAdapter class

Method createExtensionRoot

protected void
createExtensionRoot
()
Method to create the extension root path if necessary
Returns
  • void
Since
  • 3.4
-
  • \RuntimeException
Class: PluginAdapter
Project: Joomla

Method createExtensionRoot - Source code

/**
 * Method to create the extension root path if necessary
 *
 * @return  void
 *
 * @since   3.4
 * @throws  \RuntimeException
 */
protected function createExtensionRoot()
{
    // Run the common create code first
    parent::createExtensionRoot();
    // If we're updating at this point when there is always going to be an extension_root find the old XML files
    if ($this->route === 'update') {
        // Create a new installer because findManifest sets stuff; side effects!
        $tmpInstaller = new Installer();
        // Look in the extension root
        $tmpInstaller->setPath('source', $this->parent->getPath('extension_root'));
        if ($tmpInstaller->findManifest()) {
            $old_manifest = $tmpInstaller->getManifest();
            $this->oldFiles = $old_manifest->files;
        }
    }
}
OSZAR »