This action will be executed on the activation of the module

@access public
@param string $versionNumber
@param string $oldVersionNumber
967197
public function activate($versionNumber, $oldVersionNumber = '')
    {
        $runtimeManager = $this->framework->getRuntimeManager();
        $runtimeManager->addEventHandler('\\Zepi\\Core\\Management\\Event\\RebuildFrameworkCache', '\\Zepi\\Core\\Management\\EventHandler\\RebuildFrameworkCache');
        $runtimeManager->addEventHandler('\\Zepi\\Core\\Management\\Event\\ListModules', '\\Zepi\\Core\\Management\\EventHandler\\ListModules');
        
        $routeManager = $this->framework->getRouteManager();
        $routeManager->addRoute('core|rebuildFrameworkCache', '\\Zepi\\Core\\Management\\Event\\RebuildFrameworkCache');
        $routeManager->addRoute('core|listModules', '\\Zepi\\Core\\Management\\Event\\ListModules');
    }
561447
public function map(FieldRouter $fields, VersionRouter $versions, AssignmentRouter $assignments)
    {
        $fields->route($this->addon, FieldsController::class);
        $versions->route($this->addon, VersionsController::class);
        $assignments->route($this->addon, AssignmentsController::class, 'admin/variables/groups');
    }
495370
public function getOneVersion($versionNumber, $con = null)
    {
        return ChildDealerVersionQuery::create()
            ->filterByDealer($this)
            ->filterByVersion($versionNumber)
            ->findOne($con);
    }
711823
protected function updateFieldData(VersionInfo $versionInfo, Field $field)
    {
        $updateQuery = $this->connection->createQueryBuilder();
        $updateQuery->update($this->connection->quoteIdentifier(self::MAP_LOCATION_TABLE))
            ->set($this->connection->quoteIdentifier('latitude'), ':latitude')
            ->set($this->connection->quoteIdentifier('longitude'), ':longitude')
            ->set($this->connection->quoteIdentifier('address'), ':address')
            ->where(
                $updateQuery->expr()->andX(
                    $updateQuery->expr()->eq(
                        $this->connection->quoteIdentifier('contentobject_attribute_id'),
                        ':fieldId'
                    ),
                    $updateQuery->expr()->eq(
                        $this->connection->quoteIdentifier('contentobject_version'),
                        ':versionNo'
                    )
                )
            )
            ->setParameter(':latitude', $field->value->externalData['latitude'])
            ->setParameter(':longitude', $field->value->externalData['longitude'])
            ->setParameter(':address', $field->value->externalData['address'])
            ->setParameter(':fieldId', $field->id, PDO::PARAM_INT)
            ->setParameter(':versionNo', $versionInfo->versionNo, PDO::PARAM_INT)
        ;

        $updateQuery->execute();
    }
904550
public function loadFieldData( VersionInfo $versionInfo, Field $field )
    {
        $connection = $this->getConnection();

        $query = $connection->createSelectQuery();
        $query
            ->selectDistinct( "*" )
            ->from( $connection->quoteTable( self::TABLE ) )
            ->where(
                $query->expr->lAnd(
                    $query->expr->eq(
                        $connection->quoteColumn( "objectattribute_id" ),
                        $query->bindValue( $field->id, null, PDO::PARAM_INT )
                    ),
                    $query->expr->eq(
                        $connection->quoteColumn( "objectattribute_version" ),
                        $query->bindValue( $versionInfo->versionNo, null, PDO::PARAM_INT )
                    )
                )
            );
        $statement = $query->prepare();
        $statement->execute();

        return $statement->fetchAll( PDO::FETCH_ASSOC );
    }
178420
public static function compareVersion($version1, $version2)
    {
        if ($version1 == $version2) {
            return 0;
        }

        $v1 = Parser::parse($version1);
        $v2 = Parser::parse($version2);

        return self::compare($v1, $v2);
    }
897121
public function applyVersionOperations()
    {
        foreach ($this->checkoutUuids as $uuid) {
            $node = $this->defaultSession->getNodeByIdentifier($uuid);
            $path = $node->getPath();

            if (!$this->versionManager->isCheckedOut($path)) {
                $this->versionManager->checkout($path);
            }
        }

        $this->checkoutUuids = [];

        /** @var NodeInterface[] $nodes */
        $nodes = [];
        $nodeVersions = [];
        foreach ($this->checkpointUuids as $versionInformation) {
            $node = $this->defaultSession->getNodeByIdentifier($versionInformation['uuid']);
            $path = $node->getPath();

            $version = $this->versionManager->checkpoint($path);

            if (!array_key_exists($path, $nodes)) {
                $nodes[$path] = $this->defaultSession->getNode($path);
            }
            $versions = $nodes[$path]->getPropertyValueWithDefault(static::VERSION_PROPERTY, []);

            if (!array_key_exists($path, $nodeVersions)) {
                $nodeVersions[$path] = $versions;
            }
            $nodeVersions[$path][] = json_encode(
                [
                    'locale' => $versionInformation['locale'],
                    'version' => $version->getName(),
                    'author' => $versionInformation['author'],
                    'authored' => date('c'),
                ]
            );
        }

        foreach ($nodes as $uuid => $node) {
            $node->setProperty(static::VERSION_PROPERTY, $nodeVersions[$uuid]);
        }

        $this->defaultSession->save();
        $this->checkpointUuids = [];
    }
1057058
public function activate($versionNumber, $oldVersionNumber = '')
    {
        $configurationManager = $this->framework->getInstance('\\Zepi\\Core\\Utils\\Manager\\ConfigurationManager');
        $configurationManager->addSettingIfNotSet('doctrine.databaseDriver', 'pdo_mysql');
        $configurationManager->addSettingIfNotSet('doctrine.databaseHost', 'localhost');
        $configurationManager->addSettingIfNotSet('doctrine.databaseName', '');
        $configurationManager->addSettingIfNotSet('doctrine.databaseUser', '');
        $configurationManager->addSettingIfNotSet('doctrine.databasePassword', '');
        $configurationManager->saveConfigurationFile();
        
        $runtimeManager = $this->framework->getRuntimeManager();
        $runtimeManager->addEventHandler('\\Zepi\\Installation\\ExecuteInstallation', '\\Zepi\\DataSource\\Doctrine\\EventHandler\\ExecuteInstallation', 51);
    }
1328182
public function rollbackToVersion($versionNumber): Template
    {
        $versionNumber = $versionNumber instanceof VersionNumber
            ? $versionNumber
            : VersionNumber::fromValue($versionNumber);

        $response = $this->client->rollbackToVersion($versionNumber);

        return Template::fromResponse($response);
    }
126685
protected function registerSupportedVersions(VersionControl $version): void
    {
        foreach ($this->versions as $code => $namespace) {
            $version->addVersion($code, $namespace);
        }

        if (! is_null($this->defaultVersion)) {
            $version->setDefaultVersion($this->defaultVersion);
        }
    }
956468
public function getOneVersion($versionNumber, $con = null)
    {
        return ChildDealerContactInfoVersionQuery::create()
            ->filterByDealerContactInfo($this)
            ->filterByVersion($versionNumber)
            ->findOne($con);
    }
43864
public function activate($versionNumber, $oldVersionNumber = '')
    {
        // Configuration
        $configurationManager = $this->framework->getInstance('\\Zepi\\Core\\Utils\\Manager\\ConfigurationManager');
        $configurationManager->addSettingIfNotSet('mailer.type', 'sendmail');
        $configurationManager->addSettingIfNotSet('mailer.sendmailCommand', '/usr/sbin/sendmail -bs');
        $configurationManager->addSettingIfNotSet('mailer.smtpHost', '');
        $configurationManager->addSettingIfNotSet('mailer.smtpPort', 25);
        $configurationManager->addSettingIfNotSet('mailer.smtpUsername', '');
        $configurationManager->addSettingIfNotSet('mailer.smtpPassword', '');
        $configurationManager->addSettingIfNotSet('mailer.sendFrom', 'info@turbo.local');
        $configurationManager->addSettingIfNotSet('mailer.sendFromName', 'zepi Turbo');
        $configurationManager->saveConfigurationFile();
    }
232795
protected function updateFieldData(VersionInfo $versionInfo, Field $field)
    {
        $connection = $this->getConnection();

        $updateQuery = $connection->createUpdateQuery();
        $updateQuery->update($connection->quoteTable('ezgmaplocation'))
            ->set(
                $connection->quoteColumn('latitude'),
                $updateQuery->bindValue($field->value->externalData['latitude'])
            )->set(
                $connection->quoteColumn('longitude'),
                $updateQuery->bindValue($field->value->externalData['longitude'])
            )->set(
                $connection->quoteColumn('address'),
                $updateQuery->bindValue($field->value->externalData['address'])
            )->where(
                $updateQuery->expr->lAnd(
                    $updateQuery->expr->eq(
                        $connection->quoteColumn('contentobject_attribute_id'),
                        $updateQuery->bindValue($field->id, null, \PDO::PARAM_INT)
                    ),
                    $updateQuery->expr->eq(
                        $connection->quoteColumn('contentobject_version'),
                        $updateQuery->bindValue($versionInfo->versionNo, null, \PDO::PARAM_INT)
                    )
                )
            );

        $updateQuery->prepare()->execute();
    }
1033272
@Override
    public R visitVersion(VersionTree node, P p) {
        return defaultAction(node, p);
    }
560701
public function writeVersion(Version $version)
    {
        $cacheItem = $this->cache->getItem('version');
        $cacheItem->set($version);

        $this->cache->save($cacheItem);
        $this->writer->write($version);
    }
97026
public static function getVersionForNumber(int $versionNumber) : self
    {
        if ($versionNumber < 1 || $versionNumber > 40) {
            throw new InvalidArgumentException('Version number must be between 1 and 40');
        }

        return self::versions()[$versionNumber - 1];
    }
112351
public void setOldModule() {

        m_oldModule = true;
        if (LOG.isDebugEnabled()) {
            LOG.debug(Messages.get().getBundle().key(Messages.LOG_OLD_MODULE_IMPORTED_0));
        }
    }