Back to PluginAdapter class

Method setupInstallPaths

protected void
setupInstallPaths
()
Method to do any prechecks and setup the install paths for the extension
Returns
  • void
Since
  • 3.4
-
  • \RuntimeException
Class: PluginAdapter
Project: Joomla

Method setupInstallPaths - Source code

/**
 * Method to do any prechecks and setup the install paths for the extension
 *
 * @return  void
 *
 * @since   3.4
 * @throws  \RuntimeException
 */
protected function setupInstallPaths()
{
    $this->group = (string) $this->getManifest()->attributes()->group;
    if (empty($this->element) && empty($this->group)) {
        throw new \RuntimeException(Text::sprintf('JLIB_INSTALLER_ABORT_PLG_INSTALL_NO_FILE', Text::_('JLIB_INSTALLER_' . $this->route)));
    }
    $this->parent->setPath('extension_root', JPATH_PLUGINS . '/' . $this->group . '/' . $this->element);
}