Actions

API15

JInstallerLanguage/uninstall

From Joomla! Documentation

< API15:JInstallerLanguage
Revision as of 13:32, 12 May 2013 by JoomlaWikiBot (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Replacement filing cabinet.png
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.

Contents

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

<CodeExamplesForm />