承接 presta/sonata-saved-filters-bundle 相关项目开发

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

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

presta/sonata-saved-filters-bundle

Composer 安装命令:

composer require presta/sonata-saved-filters-bundle

包简介

A Symfony bundle to allow user to save and share filters in Sonata Admin

README 文档

README

PrestaSonataSavedFiltersBundle will allow your Sonata users to save and share list filters.

Preview

On each admin, you can save current filters to a dedicated database entry, after naming it. Save filter form

When you saved a filter, you can reapply it whenever you want on the admin it was created. Saved filters dropdown

An admin exists where you can see, share, remove filters created in the application. Saved filters admin list

Installation

Install the bundle with the command:

$ composer require presta/sonata-saved-filters-bundle

Enable the bundle:

# config/bundles.php
return [
+    Presta\SonataSavedFiltersBundle\PrestaSonataSavedFiltersBundle::class => ['all' => true],
];

Configuration

Import our Javascripts in your project:

import '../../public/bundles/prestasonatasavedfilters/scripts/app';

This step is highly dependent on how your public assets are built, imported. It's up to you knowing the best way to include it in your project.

Include our action template into the Twig template you configured to be your admin layout:

{% extends '@SonataAdmin/standard_layout.html.twig' %}

{% block sonata_admin_content_actions_wrappers %}
    {{ parent() }}
    {{ include('@PrestaSonataSavedFilters/saved_filters_action.html.twig') }}
{% endblock %}

See related SonataAdmin documentation

Configure to doctrine that what entity will be attached to saved filters config/packages/doctrine.yaml:

<?php

use Doctrine\ORM\Mapping as ORM;
use Presta\SonataSavedFiltersBundle\Entity\SavedFiltersOwnerInterface;
use Symfony\Component\Security\Core\User\UserInterface;

#[ORM\Entity]
class User implements UserInterface, SavedFiltersOwnerInterface
{
}
# config/packages/doctrine.yaml
doctrine:
  orm:
    resolve_target_entities:
      Presta\SonataSavedFiltersBundle\Entity\SavedFiltersOwnerInterface: 'App\Entity\User'

See related DoctrineBundle documentation

Add the admin to the menu, where you want it:

# config/packages/sonata_admin.yaml
sonata_admin:
    dashboard:
        groups:
          the_group_in_which_you_want_the_admin:
                items:
                    - presta_sonata_saved_filters.saved_filters

If you're using a security-layer, grant the roles ROLE_PRESTA_SONATA_SAVED_FILTERS_SAVED_FILTERS_LIST and/or ROLE_PRESTA_SONATA_SAVED_FILTERS_SAVED_FILTERS_ALL to the eligible users.

Finally, update your schema to create the tables required for our entities:

$ bin/console doctrine:schema:update 

Or create a migration if you have DoctrineMigrationsBundle installed:

$ bin/console doctrine:migrations:diff
$ bin/console doctrine:migrations:migrate

This project is supported by PrestaConcept

Released under the MIT License

presta/sonata-saved-filters-bundle 适用场景与选型建议

presta/sonata-saved-filters-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 22.3k 次下载、GitHub Stars 达 2, 最近一次更新时间为 2023 年 10 月 10 日, 在 PHP 生态内属于活跃度较高的组件。

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

围绕 presta/sonata-saved-filters-bundle 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

  • 总下载量: 22.3k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 26
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 8
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-10-10