Override class in Classes/Base/

Questions around the TYPO3 integration and plugins
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
cnoelker
Advanced
Posts: 140
Joined: 20 Feb 2016, 18:21

Override class in Classes/Base/

Post by cnoelker » 18 Dec 2019, 12:51

Hello,
what is the correct way to override a class in Classes/Base/ , in the aimeos TYPO3 extension?
Claudia

User avatar
aimeos
Administrator
Posts: 7836
Joined: 01 Jan 1970, 00:00

Re: Override class in Classes/Base/

Post by aimeos » 19 Dec 2019, 07:22

Add a closure function to the ext_localconf.php of your Aimeos TYPO3 extension for your project that returns the object implementation you need, e.g.

Code: Select all

$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context'] = function( $config ) {
	return new Mycontext( $config );
}
Check the Aimeos base class to see what objects you can overwrite and how:
https://github.com/aimeos/aimeos-typo3/ ... s/Base.php
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

cnoelker
Advanced
Posts: 140
Joined: 20 Feb 2016, 18:21

Re: Override class in Classes/Base/

Post by cnoelker » 19 Dec 2019, 08:58

Thank you, it works. :)

Post Reply