承接 magehack/autogrid 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

magehack/autogrid

Composer 安装命令:

composer require magehack/autogrid

包简介

The Magehack_Autogrid can do most of the work for your simple or more complex grids.

README 文档

README

Every time a developer has to display information from database tables on Magento admin, she has to write the same code again and again. Magehack_Autogrid can do most of the work for you, as long as the grid is dealing with a flat table.

Facts

Description

Every time a developer has to display information from database tables on Magento admin, she has to write the same code again and again. Magehack_Autogrid does most of the work automatically, as long as the grid is dealing with a flat table.

It only requires a potentially very small config file (like, 5 lines of XML excluding the root node), and the rest is taken care of automatically.
This code belongs in a file called etc/autogrid.xml in a modules directory.

<config>
    <tables>
        <example_product_table>
            <table>catalog/product</table>
        </example_product_table>
    </tables>
</config>

Additional options can be specified of course, overriding the defaults:

<config>
    <tables>
        <example_product_table>
            <table>catalog/product</table>
            <title>Autogrid Example Table</title>
            <grid>
                <entity_type_id>
                    <sortable>0</sortable>
                </entity_type_id>
                <has_options>
                    <source_model>magehack_autogrid/table_column_source_yesno</source_model>
                </has_options>
                <type_id>
                    <header>The Product Type</header>
                </type_id>
            </grid>
            <form>
                <type_id>
                    <disabled>1</disabled>
                </type_id>
            </form>
        </example_product_table>
    </tables>
</config>

Please have a look at the examples in the etc/autogrid.xml file for more examples.

Also, global defaults based on column name can be specified in the usual config.xml files:

<config>
    <adminhtml>
        <autogrid>
            <column_defaults>
                <attribute_set_id>
                    <frontend_input>select</frontend_input>
                    <source_model>magehack_autogrid/table_column_source_attributeSetId</source_model>
                </attribute_set_id>
                <website_ids>
                    <frontend_input>multiselect</frontend_input>
                    <source_model>magehack_autogrid/table_column_source_websiteId</source_model>
                </website_ids>
                <created_at>
                    <disabled>1</disabled>
                </created_at>
            </column_defaults>
        </autogrid>
    </adminhtml>
</config>

There are a number of nice features, for example backend model support for flat table entities.

<config>
    <tables>
        <example_product_table>
            <form>
                <updated_at>
                    <backend_model>magehack_autogrid/table_column_backend_updatedAt</backend_model>
                </updated_at>
            </form>
        </example_product_table>
    </tables>
</config>

Extension Stability

The extensions source still shows its roots in a one-night hackathon, but work has continued and it is in a usable and rather maintainable state.
Plenty of work can still be done

Usage

  1. Install the Magehack_Autogrid module
  2. Create the table in your module as usual using a setup script
  3. Create the autogrid.xml file in your modules etc/ directory (syntax is coming soon)

The module will reading the database table and guess default behaviour for grid (and soon also the form.

Compatibility

  • Magento >= 1.7 (probably also earlier)

Installation Instructions

If you are using the Magento compiler, disable compilation before the installation, and after the module is installed, you need to run the compiler again.

  1. Install the extension from github (its not on Magento Connect).
  2. Clear the cache, logout from the admin panel and then login again.

Todo

Here a list of the todo items that I've got in my mind at the moment:

  • add per table acl resource support
  • add more tests
  • refactor column class further, column types should be individual classes based on an abstract column type
  • complete "all-tables" grid support (view selected tables, create, edit and delete for table contents)
  • remove the example autogrid.xml
  • create examples

Support

If you have any issues with this extension, open an issue on GitHub (see URL above)

Contribution

Any contributions are highly appreciated. The best way to contribute code is to open a pull request on GitHub.

Developers

Licence

OSL - Open Software Licence 3.0

magehack/autogrid 适用场景与选型建议

magehack/autogrid 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 3 次下载、GitHub Stars 达 31, 最近一次更新时间为 2020 年 04 月 21 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 magehack/autogrid 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 magehack/autogrid 我们能提供哪些服务?
定制开发 / 二次开发

基于 magehack/autogrid 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 3
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 31
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 31
  • Watchers: 8
  • Forks: 7
  • 开发语言: PHP

其他信息

  • 授权协议: OSL-3.0
  • 更新时间: 2020-04-21