Classes/Setup.php
public static function execute()
	{
		ini_set( 'max_execution_time', 0 );

		$aimeos = \Aimeos\Aimeos\Base::getAimeos();
		$sitecode = \Aimeos\Aimeos\Base::getExtConfig( 'siteCode', 'default' );
		$siteTpl = \Aimeos\Aimeos\Base::getExtConfig( 'siteTpl', 'default' );
		$taskPaths = $aimeos->getSetupPaths( $siteTpl );

		$ctx = self::getContext();
		$dbm = $ctx->getDatabaseManager();
		$config = $ctx->getConfig();

		$config->set( 'setup/site', $sitecode );

		$dbconfig = $config->get( 'resource', array() );

		foreach( $dbconfig as $rname => $dbconf )
		{
			if( strncmp( $rname, 'db', 2 ) !== 0 ) {
				unset( $dbconfig[$rname] );
			} else {
				$config->set( "resource/$rname/limit", 3 );
			}
		}


		$class = \TYPO3\CMS\Extbase\Object\ObjectManager::class;
		$objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( $class );

		if( class_exists( '\TYPO3\CMS\Core\Configuration\ExtensionConfiguration' ) )
		{
			$object = $objectManager->get( 'TYPO3\CMS\Core\Configuration\ExtensionConfiguration' ); // TYPO3 9
			$demo = $object->get( 'aimeos', 'useDemoData' );
		}
		else
		{
			$object = $objectManager->get( 'TYPO3\CMS\Extensionmanager\Utility\ConfigurationUtility' ); // TYPO3 7+8

			$conf = $object->convertValuedToNestedConfiguration( $object->getCurrentConfiguration( 'aimeos' ) );
			$demo = ( isset( $conf['useDemoData'] ) ? $conf['useDemoData'] : '' );
		}


		$local = array( 'setup' => array( 'default' => array( 'demo' => (string) $demo ) ) );
		$ctx->setConfig( new \Aimeos\MW\Config\Decorator\Memory( $config, $local ) );

		$manager = new \Aimeos\MW\Setup\Manager\Multiple( $dbm, $dbconfig, $taskPaths, $ctx );
		$manager->migrate();

		if( \Aimeos\Aimeos\Base::getExtConfig( 'cleanDb', 1 ) == 1 ) {
			$manager->clean();
		}


		if( class_exists( '\TYPO3\CMS\Core\Configuration\ExtensionConfiguration' ) )
		{
			$object->set( 'aimeos', 'useDemoData', '' );
		}
		else
		{
			$conf['useDemoData'] = '';
			$object->writeConfiguration( $conf, 'aimeos' );
		}
	}
public static function execute()
	{
		ini_set( 'max_execution_time', 0 );

		$aimeos = \Aimeos\Aimeos\Base::getAimeos();
		$sitecode = \Aimeos\Aimeos\Base::getExtConfig( 'siteCode', 'default' );
		$siteTpl = \Aimeos\Aimeos\Base::getExtConfig( 'siteTpl', 'default' );
		$taskPaths = $aimeos->getSetupPaths( $siteTpl );

		$ctx = self::getContext();
		$dbm = $ctx->getDatabaseManager();
		$config = $ctx->getConfig();

		$config->set( 'setup/site', $sitecode );

		$dbconfig = $config->get( 'resource', array() );

		foreach( $dbconfig as $rname => $dbconf )
		{
			if( strncmp( $rname, 'db', 2 ) !== 0 ) {
				unset( $dbconfig[$rname] );
			} else {
				$config->set( "resource/$rname/limit", 3 );
			}
		}


		$class = \TYPO3\CMS\Extbase\Object\ObjectManager::class;
		$objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( $class );

		if( class_exists( '\TYPO3\CMS\Core\Configuration\ExtensionConfiguration' ) )
		{
			$object = $objectManager->get( 'TYPO3\CMS\Core\Configuration\ExtensionConfiguration' ); // TYPO3 9
			$demo = $object->get( 'aimeos', 'useDemoData' );
		}
		else
		{
			$object = $objectManager->get( 'TYPO3\CMS\Extensionmanager\Utility\ConfigurationUtility' ); // TYPO3 7+8

			$conf = $object->convertValuedToNestedConfiguration( $object->getCurrentConfiguration( 'aimeos' ) );
			$demo = ( isset( $conf['useDemoData'] ) ? $conf['useDemoData'] : '' );
		}


		$local = array( 'setup' => array( 'default' => array( 'demo' => (string) $demo ) ) );
		$ctx->setConfig( new \Aimeos\MW\Config\Decorator\Memory( $config, $local ) );

		$manager = new \Aimeos\MW\Setup\Manager\Multiple( $dbm, $dbconfig, $taskPaths, $ctx );
		$manager->migrate();

		if( \Aimeos\Aimeos\Base::getExtConfig( 'cleanDb', 1 ) == 1 ) {
			$manager->clean();
		}


		if( class_exists( '\TYPO3\CMS\Core\Configuration\ExtensionConfiguration' ) )
		{
			$object->set( 'aimeos', 'useDemoData', '' );
		}
		else
		{
			$conf['useDemoData'] = '';
			$object->writeConfiguration( $conf, 'aimeos' );
		}
	}
public static function execute ( ) { ini_set ( 'max_execution_time' , 0 ) ; $ aimeos = \ Aimeos \ Aimeos \ Base :: getAimeos ( ) ; $ sitecode = \ Aimeos \ Aimeos \ Base :: getExtConfig ( 'siteCode' , 'default' ) ; $ siteTpl = \ Aimeos \ Aimeos \ Base :: getExtConfig ( 'siteTpl' , 'default' ) ; $ taskPaths = $ aimeos -> getSetupPaths ( $ siteTpl ) ; $ ctx = self :: getContext ( ) ; $ dbm = $ ctx -> getDatabaseManager ( ) ; $ config = $ ctx -> getConfig ( ) ; $ config -> set ( 'setup/site' , $ sitecode ) ; $ dbconfig = $ config -> get ( 'resource' , array ( ) ) ; foreach ( $ dbconfig as $ rname => $ dbconf ) { if ( strncmp ( $ rname , 'db' , 2 ) !== 0 ) { unset ( $ dbconfig [ $ rname ] ) ; } else { $ config -> set ( "resource/$rname/limit" , 3 ) ; } } $ class = \ TYPO3 \ CMS \ Extbase \ Object \ ObjectManager :: class ; $ objectManager = \ TYPO3 \ CMS \ Core \ Utility \ GeneralUtility :: makeInstance ( $ class ) ; if ( class_exists ( '\TYPO3\CMS\Core\Configuration\ExtensionConfiguration' ) ) { $ object = $ objectManager -> get ( 'TYPO3\CMS\Core\Configuration\ExtensionConfiguration' ) ; // TYPO3 9 $ demo = $ object -> get ( 'aimeos' , 'useDemoData' ) ; } else { $ object = $ objectManager -> get ( 'TYPO3\CMS\Extensionmanager\Utility\ConfigurationUtility' ) ; // TYPO3 7+8 $ conf = $ object -> convertValuedToNestedConfiguration ( $ object -> getCurrentConfiguration ( 'aimeos' ) ) ; $ demo = ( isset ( $ conf [ 'useDemoData' ] ) ? $ conf [ 'useDemoData' ] : '' ) ; } $ local = array ( 'setup' => array ( 'default' => array ( 'demo' => ( string ) $ demo ) ) ) ; $ ctx -> setConfig ( new \ Aimeos \ MW \ Config \ Decorator \ Memory ( $ config , $ local ) ) ; $ manager = new \ Aimeos \ MW \ Setup \ Manager \ Multiple ( $ dbm , $ dbconfig , $ taskPaths , $ ctx ) ; $ manager -> migrate ( ) ; if ( \ Aimeos \ Aimeos \ Base :: getExtConfig ( 'cleanDb' , 1 ) == 1 ) { $ manager -> clean ( ) ; } if ( class_exists ( '\TYPO3\CMS\Core\Configuration\ExtensionConfiguration' ) ) { $ object -> set ( 'aimeos' , 'useDemoData' , '' ) ; } else { $ conf [ 'useDemoData' ] = '' ; $ object -> writeConfiguration ( $ conf , 'aimeos' ) ; } }
Executes the setup tasks for updating the database.

The setup tasks print their information directly to the standard output.
To avoid this, it's necessary to use the output buffering handler
(ob_start(), ob_get_contents() and ob_end_clean()).

@param string|null $extname Installed extension name
Executes the setup tasks for updating the database .