Reputation: 857
I created a component for joomla 3.2. It has a folder with framework files (folder name is forms). How can I transfer this folder to joomlaroot/libraries/ folder ?
Can this be done only using manifest file, or I need to use install.component.php file ? If yes, how can I specify path of 'forms' folder?
I guess I should use something like:
class com_ComponentInstallerScript
{
function install( $parent )
{
jimport('joomla.filesystem.folder');
jimport('joomla.filesystem.file');
$target= 'forms';
$destination = JPATH_ROOT.'/libraries/';
JFolder::copy($target, $destination);
}
}
Upvotes: 1
Views: 217
Reputation: 42622
Here are the steps:
create a package which will contain the component that you already have
the library that you need to create. Read the article How To Package Joomla Libraries. Also here is a live example with the PHPExcel library for Joomla.
Upvotes: 1
Reputation: 6770
The Joomla installer has adapters for single files and for libraries, so what you would do is just package in that way. Then you can put your whole install package into a combined install.
Upvotes: 1