API15:JInstallerLanguage/uninstall
From Joomla! Documentation
Description
Custom uninstall method
[<! removed edit link to red link >]
<! removed transcluded page call, red link never existed >
Syntax
uninstall($tag, $clientId)
| Parameter Name | Default Value | Description |
|---|---|---|
| $tag | $tag The tag of the language to uninstall | |
| $clientId | $clientId The id of the client (unused) |
Returns
mixed Return value for uninstall method in component uninstall file
Defined in
libraries/joomla/installer/adapters/language.php
Importing
jimport( 'joomla.installer.adapters.language' );
Source Body
function uninstall($tag, $clientId)
{
$path = trim($tag);
if (!JFolder::exists($path)) {
JError::raiseWarning(100, JText::_('Language').' '.JText::_('Uninstall').': '.JText::_('Language path is empty, cannot uninstall files'));
return false;
}
if (!JFolder::delete($path)) {
JError::raiseWarning(100, JText::_('Language').' '.JText::_('Uninstall').': '.JText::_('Unable to remove language directory'));
return false;
}
return true;
}
[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >
Examples
Code Examples