1
votes

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?

1

1 Answers