PHPackages                             alengo/block-settings-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. alengo/block-settings-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

alengo/block-settings-bundle
============================

Configurable block settings injection for Sulu CMS content blocks

1.0.1(1mo ago)13↑1900%MITPHPPHP ^8.2

Since Apr 5Pushed 1mo agoCompare

[ Source](https://github.com/alengodev/SuluBlockSettingsBundle)[ Packagist](https://packagist.org/packages/alengo/block-settings-bundle)[ Docs](https://github.com/alengodev/SuluBlockSettingsBundle)[ RSS](/packages/alengo-block-settings-bundle/feed)WikiDiscussions 1.x Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (4)Used By (0)

SuluBlockSettingsBundle
=======================

[](#sulublocksettingsbundle)

Injects configurable section forms into Sulu CMS block settings via a single visitor — replacing the boilerplate of one `FormMetadataVisitor` class per section.

The Problem
-----------

[](#the-problem)

Sulu allows extending the block settings form (`content_block_settings`) via `FormMetadataVisitorInterface`. In practice, every project needs multiple additional sections (theme, spacing, anchor, background, etc.), each requiring its own visitor class and service registration:

```
// Three nearly identical classes, one per section
class BlockSettingsThemeFormMetadataVisitor implements FormMetadataVisitorInterface { ... }
class BlockSettingsSpacingFormMetadataVisitor implements FormMetadataVisitorInterface { ... }
class BlockSettingsAnchorFormMetadataVisitor implements FormMetadataVisitorInterface { ... }
```

```
# Three service definitions with individual priorities
App\Admin\FormMetadataVisitor\BlockSettingsThemeFormMetadataVisitor:
    tags:
        - { name: sulu_admin.form_metadata_visitor, priority: -10 }
# ...
```

This bundle replaces all of that with a single visitor driven by configuration.

Installation
------------

[](#installation)

```
composer require alengo/block-settings-bundle
```

Register the bundle in `config/bundles.php`:

```
Alengo\SuluBlockSettingsBundle\BlockSettingsBundle::class => ['all' => true],
```

Configuration
-------------

[](#configuration)

Create `config/packages/alengo_block_settings.yaml`:

```
alengo_block_settings:
    sections:
        - content_block_settings_theme
        - content_block_settings_spacing
        - content_block_settings_anchor
```

Sections are injected in the order defined. Each entry is the key of an XML form registered with Sulu's `XmlFormMetadataLoader` — typically placed in `config/forms/`.

### Full configuration reference

[](#full-configuration-reference)

```
alengo_block_settings:
    form_key: content_block_settings  # target form to inject into (default)
    priority: -10                      # visitor tag priority (default)
    sections:
        - content_block_settings_theme
        - content_block_settings_spacing
        - content_block_settings_anchor
```

How It Works
------------

[](#how-it-works)

`BlockSettingsFormMetadataVisitor` is registered as a `sulu_admin.form_metadata_visitor`. On each visit it:

1. Checks if the current form matches the configured `form_key`
2. Loads each configured section via `XmlFormMetadataLoader`
3. Skips sections already present (idempotent across locales)
4. Appends items in configured order

Project-side XML forms
----------------------

[](#project-side-xml-forms)

The bundle provides the injection mechanism — the actual form definitions remain in the project. Example `config/forms/content_block_settings_theme.xml`:

```

    content_block_settings_theme

```

Requirements
------------

[](#requirements)

PackageVersionPHP`^8.2`Sulu`^3.0`Symfony`^7.0`License
-------

[](#license)

MIT — [alengo.dev](https://alengo.dev)

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance90

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

45d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4a3bea97975bdeddcfa5b76c222740e703e4ff5f9bbf5f6d5d75e8827e0a48ac?d=identicon)[alengodev](/maintainers/alengodev)

---

Top Contributors

[![hual7](https://avatars.githubusercontent.com/u/89628357?v=4)](https://github.com/hual7 "hual7 (3 commits)")

### Embed Badge

![Health badge](/badges/alengo-block-settings-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/alengo-block-settings-bundle/health.svg)](https://phpackages.com/packages/alengo-block-settings-bundle)
```

###  Alternatives

[symfony/maker-bundle

Symfony Maker helps you create empty commands, controllers, form classes, tests and more so you can forget about writing boilerplate code.

3.4k111.1M568](/packages/symfony-maker-bundle)[pentatrion/vite-bundle

Vite integration for your Symfony app

2755.3M13](/packages/pentatrion-vite-bundle)[netgen/layouts-core

Netgen Layouts enables you to build and manage complex web pages in a simpler way and with less coding. This is the core of Netgen Layouts, its heart and soul.

3689.4k10](/packages/netgen-layouts-core)[sulu/headless-bundle

Bundle that provides controllers and services for using Sulu as headless content management system

55133.7k2](/packages/sulu-headless-bundle)[robole/sulu-ai-translator-bundle

Translate any type of content using DeepL

181.3k](/packages/robole-sulu-ai-translator-bundle)[netgen/content-browser

Netgen Content Browser is a Symfony bundle that provides an interface which selects items from any kind of backend and returns the IDs of selected items back to the calling code.

14112.1k8](/packages/netgen-content-browser)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
