定制 manuxi/sulu-abbreviations-bundle 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

manuxi/sulu-abbreviations-bundle

最新稳定版本:1.8.5

Composer 安装命令:

composer require manuxi/sulu-abbreviations-bundle

包简介

Say hello to Sulu abbreviations!

README 文档

README

php workflow symfony workflow License: MIT GitHub Tag Supports Sulu 2.6 or later

I made this bundle to have the possibility to manage abbreviations in my projects.

This bundle contains

  • Several filters for Abbreviations Content Type
  • Link Provider
  • Sitemap Provider
  • Handler for Trash Items
  • Handler for Automation
  • Possibility to assign a contact as author
  • Twig Extension for resolving Abbreviations / get a list of Abbreviations
  • Events for displaying Activities
  • Search indexes
    • refresh whenever entity is changed
    • distinct between normal and draft and more...

The abbreviations are translatable.

Please feel comfortable submitting feature requests. This bundle is still in development. Use at own risk 🤞🏻

image

👩🏻‍🏭 Installation

Install the package with:

composer require manuxi/sulu-abbreviations-bundle

If you're not using Symfony Flex, you'll also need to add the bundle in your config/bundles.php file:

return [
    //...
    Manuxi\SuluAbbreviationsBundle\SuluAbbreviationsBundle::class => ['all' => true],
];

Please add the following to your routes_admin.yaml:

SuluAbbreviationsBundle:
    resource: '@SuluAbbreviationsBundle/Resources/config/routes_admin.yaml'

Don't forget fo add the index to your sulu_search.yaml:

add "abbreviations_published"!

"abbreviations_published" is the index of published, "abbreviations" the index of unpublished elements. Both indexes are searchable in admin.

sulu_search:
    website:
        indexes:
            - abbreviations_published
            - ...

Last but not least the schema of the database needs to be updated.

Some tables will be created (prefixed with app_):
abbreviations, abbreviations_translation.

See the needed queries with

php bin/console doctrine:schema:update --dump-sql

Update the schema by executing

php bin/console doctrine:schema:update --force

Make sure you only process the bundles schema updates!

🎣 Usage

First: Grant permissions for abbreviations. After reload you should see the abbreviations item in the navigation. Start to create abbreviations. Use smart_content property type to show a list of abbreviations, e.g.:

<property name="abbreviations" type="smart_content">
    <meta>
        <title lang="en">Abbreviations</title>
        <title lang="de">Abbreviations</title>
    </meta>
    <params>
        <param name="provider" value="abbreviations"/>
        <param name="max_per_page" value="5"/>
        <param name="page_parameter" value="page"/>
    </params>
</property>

Example of the corresponding twig template for the abbreviations list:

{% for abbreviation in abbreviations %}
    <div class="col">
        <h2>
            {{ abbreviation.name }}
        </h2>
        <p>
            {{ abbreviation.explanation|raw }}
        </p>
    </div>
{% endfor %}

🧶 Configuration

This bundle contains settings for controlling the following tasks:

  • Settings for single view - Toggle for header, default hero snippet and breadcrumbs
  • Intermediate pages for breadcrumbs: this can be used to configure the intermediate pages for the breadcrumbs

👩‍🍳 Contributing

For the sake of simplicity this extension was kept small. Please feel comfortable submitting issues or pull requests. As always I'd be glad to get your feedback to improve the extension :).

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

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