Back to TemplateAdapter class

Method finaliseInstall

protected void
finaliseInstall
()
Method to finalise the installation processing
Returns
  • void
Since
  • 3.1
-
  • \RuntimeException

Method finaliseInstall - Source code

/**
 * Method to finalise the installation processing
 *
 * @return  void
 *
 * @since   3.1
 * @throws  \RuntimeException
 */
protected function finaliseInstall()
{
    // Clobber any possible pending updates
    /** @var Update $update */
    $update = Table::getInstance('update');
    $uid = $update->find(array('element' => $this->element, 'type' => $this->type, 'client_id' => $this->clientId));
    if ($uid) {
        $update->delete($uid);
    }
    // Lastly, we will copy the manifest file to its appropriate place.
    if ($this->route !== 'discover_install') {
        if (!$this->parent->copyManifest(-1)) {
            // Install failed, rollback changes
            throw new \RuntimeException(Text::sprintf('JLIB_INSTALLER_ABORT_COPY_SETUP', Text::_('JLIB_INSTALLER_' . strtoupper($this->route))));
        }
    }
}