承接 flipboxfactory/craft-element-lists 相关项目开发

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

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

flipboxfactory/craft-element-lists

Composer 安装命令:

composer require flipboxfactory/craft-element-lists

包简介

Simple Element lists

README 文档

README

Join the chat at https://gitter.im/flipboxfactory/craft-element-lists Software License Build Status Coverage Status Quality Score Total Downloads

Element List introduces a table-based element relational field type; perfect for large or growing element relations.

Screenshot

New in Version 3

Element List field(s) now return a Relationship Interface (not the traditional Element Query Interface). As a result, if your app manipulates relationships in a custom manner (php/plugins/modules) some changes are required. Specifically, manipulating relations should use the add, remove, and save methods on the Relationship Interface (examples are below).

Note: Accessing field data using the legacy Element Query Interface via TWIG is still supported; no code change are required.

Requirements

This plugin requires Craft CMS 3.2.x thru Craft 3.3.x.

Installation

Choose one of the following ways to add Element List to your project:

  1. Composer:

    Simply run the following command from your project root:

    composer require flipboxfactory/craft-element-lists
    
  2. Craft CMS Plugin Store:

    Within your Craft CMS project admin panel, navigate to the 'Plugin Store' and search for 'Element List'. Installation is a button click away.

Once the plugin is included in your project, navigate to the Control Panel, go to Settings → Plugins and click the “Install” button for Element List.

Additional information (including pricing) can be found in the Plugin Store.

Features

Element List brings the familiar element 'index' view to your fields. Built for large relation sets, Element List provides content publishers a filterable, table based view to related elements. Element List is as easy to configure as native relationships.

Here are some of the features at a glance:

  • Add/Remove relations in real time
  • Handles large relational sets (hundreds/thousands)
  • Sortable list view
  • Searchable list view
  • Developer friendly

Templating (version 1 & 2)

Similar to native relational fields, an Element List field returns an Element Query Interface.

Loop through field relations:

<ul>
    {% for relatedElement in element.fieldHandle.all() %}
        <li>{{ relatedElement.id }} - {{ relatedElement.someCustomField }}</li>
    {% endfor %}
</ul>

Templating (version 3)

An Element List field returns an Relationship Interface which is the primary interface for accessing and managing relationships.

Loop through field relations:

<ul>
    {% for relatedElement in element.fieldHandle.collection.all() %}
        <li>{{ relatedElement.id }} - {{ relatedElement.someCustomField }}</li>
    {% endfor %}
</ul>

The legacy query operations from version 1 & 2 (above) are still accessible (but discouraged).

Collections (new in Version 3)

In version 3 you'll begin to work with a Collection. These are super handy classes with various methods to interact with your data.

Eager Loading

Element Lists also supports eager-loading. Simply follow the native nested sets eager loading documentation.

Developers

Native relationship fields are not developer friendly; we aim to fix that in version 3 by introducing the concept of a Relationship Interface.
Here are a few examples:

// Add two new users to the list
Entry::findOne(['id' => 1])
    ->userListField
    ->add([
        'nate@flipboxdigital.com',
        'damien@flipboxdigital.com'
    ])
    ->save();
// Remove one user and add another
Entry::findOne(['id' => 1])
    ->userListField
    ->remove('nate@flipboxdigital.com')
    ->add('damien@flipboxdigital.com')
    ->save();
// Remove all users
Entry::findOne(['id' => 1])
    ->userListField
    ->clear()
    ->save();

In the above examples, we're saving the relationships immediately; however if you make changes to your relationships and don't save, when the element is saved the relationship changes will also be saved.

Screenshots

Element Source Filter

Inline Element Edit

Select Modal

Input Remove Action

Field Settings

Credits

flipboxfactory/craft-element-lists 适用场景与选型建议

flipboxfactory/craft-element-lists 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 9.61k 次下载、GitHub Stars 达 6, 最近一次更新时间为 2018 年 04 月 30 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「yii2」 「Craft」 「elements」 「craft cms」 「flipbox」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

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

围绕 flipboxfactory/craft-element-lists 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

  • 总下载量: 9.61k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 13
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 6
  • Watchers: 2
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: proprietary
  • 更新时间: 2018-04-30