public static function getManifest() { // Create the file manifest $manifest = new \GreenCape\Manifest\FileManifest(); // Meta data $manifest->setTarget('3.1')->setMethod('upgrade')->setName('files_joomla')->setAuthor('Joomla! Project')->setAuthorEmail('*****@*****.**')->setAuthorUrl('www.joomla.org')->setCopyright('2005 - 2013', 'Open Source Matters', false)->setLicense('GNU General Public License version 2 or later; see LICENSE.txt')->setVersion('3.1.1')->setCreationDate('April 2013')->setDescription('FILES_JOOMLA_XML_DESCRIPTION'); // Installer hooks $manifest->setScriptFile('administrator/components/com_admin/script.php'); // SQL files $update = new \GreenCape\Manifest\SchemaSection(); $update->addFolder('mysql', 'administrator/components/com_admin/sql/updates/mysql')->addFolder('sqlsrv', 'administrator/components/com_admin/sql/updates/sqlsrv')->addFolder('sqlazure', 'administrator/components/com_admin/sql/updates/sqlazure')->addFolder('postgresql', 'administrator/components/com_admin/sql/updates/postgresql'); $manifest->addSection('update', $update); // Front-end files $files = new \GreenCape\Manifest\FileSection(); $files->addFolder('administrator')->addFolder('cache')->addFolder('cli')->addFolder('components')->addFolder('images')->addFolder('includes')->addFolder('language')->addFolder('layouts')->addFolder('libraries')->addFolder('logs')->addFolder('media')->addFolder('modules')->addFolder('plugins')->addFolder('templates')->addFolder('tmp')->addFile('htaccess.txt')->addFile('web.config.txt')->addFile('LICENSE.txt')->addFile('README.txt')->addFile('index.php'); $fileset = new \GreenCape\Manifest\FilesetSection(); $fileset->addFileset($files); $manifest->addSection('fileset', $fileset); // Extension Update Specification $server = new \GreenCape\Manifest\ServerSection(); $server->addServer('collection', null, 'http://update.joomla.org/core/list.xml')->addServer('collection', null, 'http://update.joomla.org/jed/list.xml'); $manifest->addSection('updateservers', $server); return $manifest; }
public static function getManifest() { // Create the component manifest $manifest = new \GreenCape\Manifest\ComponentManifest(); // Meta data $manifest->setTarget('1.6')->setMethod('upgrade')->setName('com_alpha')->setAuthor('John Doe')->setAuthorEmail('*****@*****.**')->setAuthorUrl('http://www.example.org')->setCopyright(2008, 'Copyright Info', false)->setLicense('License Info')->setVersion('1.0')->setCreationDate('March 2006'); // Installer hooks $manifest->setInstallFile('file.install.php')->setUninstallFile('file.uninstall.php')->setScriptFile('file.script.php'); // SQL files $install = new \GreenCape\Manifest\SqlSection(); $install->addFile('mysql', 'sql/install.mysql.utf8.sql', array('charset' => 'utf8')); $manifest->addSection('install', $install); $uninstall = new \GreenCape\Manifest\SqlSection(); $uninstall->addFile('mysql', 'sql/uninstall.mysql.utf8.sql', array('charset' => 'utf8', 'folder' => 'sql')); $manifest->addSection('uninstall', $uninstall); $update = new \GreenCape\Manifest\SchemaSection(); $update->addFolder('mysql', 'sql/updates/mysql')->addFolder('sqlsrv', 'sql/updates/sqlsrv'); $manifest->addSection('update', $update); // Front-end files $files = new \GreenCape\Manifest\FileSection(); $files->setBase('site')->addFile('alpha.php'); $manifest->addSection('files', $files); // Front-end language (legacy 1.5 support) $language = new \GreenCape\Manifest\LanguageSection(); $language->setBase('site')->addFile('en-GB', 'language/en-GB/en-GB.com_alpha.ini'); $manifest->addSection('languages', $language); // Media Files $media = new \GreenCape\Manifest\MediaSection(); $media->setDestination('com_alpha')->addFile('com_alpha.jpg'); $manifest->addSection('media', $media); // Backend files $menu = new \GreenCape\Manifest\MenuSection(); $menu->setLabel('Alpha')->setIcon('components/com_alpha/applications-internet-16.png')->addMenu('Installer', 'option=com_installer')->addMenu('Users', 'option=com_users'); $adminFiles = new \GreenCape\Manifest\FileSection(); $adminFiles->setBase('admin')->addFile('admin.alpha.php')->addFile('image.png')->addFile('applications-internet.png')->addFile('applications-internet-16.png')->addFolder('sql'); $adminLanguage = new \GreenCape\Manifest\LanguageSection(); $adminLanguage->setBase('admin/language')->addFile('en-GB', 'en-GB/en-GB.com_alpha.ini')->addFile('en-GB', 'en-GB/en-GB.com_alpha.sys.ini'); $admin = new \GreenCape\Manifest\AdminSection(); $admin->setMenu($menu)->setFiles($adminFiles)->setLanguage($adminLanguage); $manifest->addSection('administration', $admin); // Extension Update Specification $server = new \GreenCape\Manifest\ServerSection(); $server->addServer('extension', 'Extension Update Site', 'http://jsitepoint.com/update/components/com_alpha/extension.xml', 1)->addServer('collection', 'Collection Update Site', 'http://jsitepoint.com/update/update.xml', 2); $manifest->addSection('updateservers', $server); // Tables $tables = new \GreenCape\Manifest\TableSection(); $tables->addTable('#__alpha_install')->addTable('#__alpha_update', true); $manifest->addSection('tables', $tables); // Dependencies $dependencies = new \GreenCape\Manifest\DependencySection(); $dependencies->addDependency('platform', 'joomla', '=', '1.5'); $manifest->addSection('dependencies', $dependencies); return $manifest; }