Esempio n. 1
0
 public static function getManifest()
 {
     // Create the plugin manifest
     $manifest = new \GreenCape\Manifest\PluginManifest();
     // Meta data
     $manifest->setTarget('1.6')->setGroup('system')->setMethod('upgrade')->setName('System - Alpha')->setCreationDate('July 2008')->setAuthor('John Doe')->setAuthorEmail('*****@*****.**')->setAuthorUrl('http://www.example.org')->setCopyright(2008, 'Copyright Info', false)->setLicense('License Info')->setVersion('1.6.0')->setDescription('PLG_ALPHA_XML_DESCRIPTION');
     // Installer hooks
     $manifest->setScriptFile('alpha.scriptfile.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'));
     $manifest->addSection('uninstall', $uninstall);
     $update = new \GreenCape\Manifest\SchemaSection();
     $update->addFolder('mysql', 'sql/updates/mysql');
     $manifest->addSection('update', $update);
     // Front-end files
     $files = new \GreenCape\Manifest\FileSection();
     $files->addFile('alpha.php', array('plugin' => 'alpha'))->addFolder('sql')->addFolder('language');
     $manifest->addSection('files', $files);
     // Front-end language (legacy 1.5 support)
     $language = new \GreenCape\Manifest\LanguageSection();
     $language->setBase('language')->addFile('en-GB', 'admin/en-GB.plg_system_alpha.ini', array('client' => 'administrator'))->addFile('en-GB', 'site/en-GB.plg_system_alpha.ini', array('client' => 'site'));
     $manifest->addSection('languages', $language);
     return $manifest;
 }
Esempio n. 2
0
 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;
 }