简体   繁体   English

如何在 shopware 6 中创建带有自定义列表的后端模块?

[英]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?如何在shopware 6中做到这一点? Do we need to create a new API for this?我们需要为此创建一个新的 API 吗? is there any documentation?有任何文件吗? Like 'listAction' https://github.com/shopwareLabs/SwagLightweightModule/blob/master/Controllers/Backend/ExampleModulePlainHtml.php in shopware 5?像 shopware 5 中的“listAction” https://github.com/shopwareLabs/SwagLightweightModule/blob/master/Controllers/Backend/ExampleModulePlainHtml.php

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?我想在 shopware 5 中创建一个新的 PHP 控制器(比如'listAction' https://github.com/shopwareLabs/SwagLightweightModule/blob/master/Controllers/Backend/ExampleModulePlainHtml.php )并从这里调用函数? how it is possible?怎么可能?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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