Actions

API16

JInstallerComponent/refreshManifestCache

From Joomla! Documentation

< API16:JInstallerComponent
Revision as of 22:00, 13 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.

[<! removed edit link to red link >]

<! removed transcluded page call, red link never existed >

Contents

Syntax

refreshManifestCache()


Defined in

libraries/joomla/installer/adapters/component.php

Importing

jimport( 'joomla.installer.adapters.component' );

Source Body

public function refreshManifestCache()
{
        // Need to find to find where the XML file is since we don't store this normally
        $client = JApplicationHelper::getClientInfo($this->parent->extension->client_id);
        $short_element = str_replace('com_', '', $this->parent->extension->element);
        $manifestPath = $client->path . DS . 'components'. DS . $this->parent->extension->element . DS . $short_element . '.xml';
        $this->parent->manifest = $this->parent->isManifest($manifestPath);
        $this->parent->setPath('manifest', $manifestPath);
 
        $manifest_details = JApplicationHelper::parseXMLInstallFile($this->parent->getPath('manifest'));
        $this->parent->extension->manifest_cache = serialize($manifest_details);
        $this->parent->extension->name = $manifest_details['name'];
        try {
                return $this->parent->extension->store();
        } catch(JException $e) {
                JError::raiseWarning(101, JText::_('Component').' '.JText::_('Refresh Manifest Cache').': '.JText::_('Failed to store extension details'));
                return false;
        }
}

[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >

Examples

<CodeExamplesForm />