* @author Romain Quetiez * @author Denis Flaven * @license http://opensource.org/licenses/AGPL-3.0 */ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file 'itop-endusers-devices/2.2.0', array( // Identification // 'label' => 'End-user Devices Management', 'category' => 'business', // Setup // 'dependencies' => array( 'itop-config-mgmt/2.2.0' ), 'mandatory' => false, 'visible' => true, 'installer' => 'EndUserMgmtInstaller', // Components // 'datamodel' => array( 'model.itop-endusers-devices.php' ), 'webservice' => array( ), 'data.struct' => array( // add your 'structure' definition XML files here, ), 'data.sample' => array( // add your sample data XML files here, ), // Documentation // 'doc.manual_setup' => '', // hyperlink to manual setup documentation, if any 'doc.more_information' => '', // hyperlink to more information, if any // Default settings // 'settings' => array( // Module specific settings go here, if any ), ) ); if (!class_exists('EndUserMgmtInstaller')) { // Module installation handler // class EndUserMgmtInstaller extends ModuleInstallerAPI { public static function BeforeWritingConfig(Config $oConfiguration) { // If you want to override/force some configuration values, do it here return $oConfiguration; } /** * Handler called before creating or upgrading the database schema * @param $oConfiguration Config The new configuration of the application * @param $sPreviousVersion string PRevious version number of the module (empty string in case of first install) * @param $sCurrentVersion string Current version number of the module */ public static function BeforeDatabaseCreation(Config $oConfiguration, $sPreviousVersion, $sCurrentVersion) { if (strlen($sPreviousVersion) > 0) { // If you want to migrate data from one format to another, do it here self::RenameClassInDB('IpPhone', 'IPPhone'); } } /** * Handler called after the creation/update of the database schema * @param $oConfiguration Config The new configuration of the application * @param $sPreviousVersion string PRevious version number of the module (empty string in case of first install) * @param $sCurrentVersion string Current version number of the module */ public static function AfterDatabaseCreation(Config $oConfiguration, $sPreviousVersion, $sCurrentVersion) { } } } ?>