简体   繁体   中英

How to create a backend module with a custom listing in shopware 6?

I want to create a custom backend module. Data for this listing have some conditions so I want to create a new file and function for the custom listing. how to do this in shopware 6? Do we need to create a new API for this? is there any documentation? Like 'listAction' https://github.com/shopwareLabs/SwagLightweightModule/blob/master/Controllers/Backend/ExampleModulePlainHtml.php in shopware 5?

This is the code to get listing entities.

created() {
    this.repository = this.repositoryFactory.create('swag_bundle');

    this.repository
        .search(new Criteria(), Shopware.Context.api)
        .then((result) => {
            this.bundles = result;
        });
}

I want to create a new PHP controller(Like 'listAction' https://github.com/shopwareLabs/SwagLightweightModule/blob/master/Controllers/Backend/ExampleModulePlainHtml.php in shopware 5) and call the function from here? how it is possible?

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