Back to TemplateAdapter class

Method checkExistingExtension

protected void
checkExistingExtension
()
Method to check if the extension is already present in the database
Returns
  • void
Since
  • 3.4
-
  • \RuntimeException

Method checkExistingExtension - Source code

/**
 * Method to check if the extension is already present in the database
 *
 * @return  void
 *
 * @since   3.4
 * @throws  \RuntimeException
 */
protected function checkExistingExtension()
{
    try {
        $this->currentExtensionId = $this->extension->find(array('element' => $this->element, 'type' => $this->type, 'client_id' => $this->clientId));
    } catch (\RuntimeException $e) {
        // Install failed, roll back changes
        throw new \RuntimeException(Text::sprintf('JLIB_INSTALLER_ABORT_ROLLBACK', Text::_('JLIB_INSTALLER_' . $this->route), $e->getMessage()), $e->getCode(), $e);
    }
}