简体   繁体   中英

TYPO3 extension builder how to extend class from another extension

I am new in extension builder TYPO3 7.6.2.

I have two extension like ExtA(Having infos) and ExtB(Having Products). I have created both the extension from extension builder separately.

What I want to do is, In ExtA, I want to create relationship between these two extensions. Like In ExtA form It will display list of Products from ExtB and I will choose some of the products from them.

Unable to understand how to extend ExtB from class.

I followed extension manual but did not get any solution.

Relations to models of other extensions:

If you want to add a relation to a model that does not belong to your current extension you have to enter the class name (not the model name!) of that model in the relations settings form. The related class has to be loadable, so you can only add models of extensions that are installed.

Tip:

Don't forget to add the extension which models you extend in the dependencies field in the left property panel. Only then the PackageManager will care for the right order loading the extensions

I don't know how to make class loadable. I tried but not found any solution. I also read another stackoverflow answers but no solution.

A class is considered to be loadable if the extension defining the class is installed.

In other words: If you want to make ExtA use some class of ExtB then ExtB has to be installed.

See updated docs of extension builder: https://docs.typo3.org/typo3cms/extensions/extension_builder/Developer/ExtendingModels.html

That means, you can extend extbase models, either of your current extension or of other extensions . You have to enter the class name (not the model name!) of the model you want to extend in the domain object settings form in the field "Extend existing model class". The class has to be loadable , that means you can only extend classes of extensions that are installed .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM