PHPackages                             pixelopen/sulu-flashinfobundle - 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. pixelopen/sulu-flashinfobundle

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

pixelopen/sulu-flashinfobundle
==============================

Flash info bundle for Sulu

2.5.2(1y ago)1139MITPHPPHP ^8.0

Since Oct 2Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Pixel-Open/sulu-flashinfobundle)[ Packagist](https://packagist.org/packages/pixelopen/sulu-flashinfobundle)[ Docs](https://github.com/Pixel-Open/sulu-flashinfobundle)[ RSS](/packages/pixelopen-sulu-flashinfobundle/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (10)Versions (5)Used By (0)

Sulu Flash Info Bundle
======================

[](#sulu-flash-info-bundle)

[![GitHub release (with filter)](https://camo.githubusercontent.com/8d054042db7d703a0b05303676417ddc1a420d63f18563e60016bc7029673051/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f506978656c2d446576656c6f7070656d656e742f73756c752d666c617368696e666f62756e646c65)](https://camo.githubusercontent.com/8d054042db7d703a0b05303676417ddc1a420d63f18563e60016bc7029673051/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f506978656c2d446576656c6f7070656d656e742f73756c752d666c617368696e666f62756e646c65)[![Dependency](https://camo.githubusercontent.com/2b385cfb766678c0eff6ba8bba366705dbd982051717b95917d3b793151388e5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f73756c752d322e352d6363613030302e737667)](https://sulu.io/)

Presentation
------------

[](#presentation)

A bundle for the Sulu CMS that allows you to manage flash information displayed with a modal.

[![](src/Resources/documentation/presentation.jpg)](src/Resources/documentation/presentation.jpg)

Features
--------

[](#features)

- program your newsflashes
- modal in vanilla js (thank you Tingle )
- twig functions to display news flashes

Requirement
-----------

[](#requirement)

- PHP &gt;= 8.0
- Sulu &gt;= 2.5
- Symfony &gt;= 5.4
- Composer

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

[](#installation)

### Install the bundle

[](#install-the-bundle)

Execute the following [composer](https://getcomposer.org/) command to add the bundle to the dependencies of your project:

```
composer require pixelopen/sulu-flashinfobundle
```

### Enable the bundle

[](#enable-the-bundle)

Enable the bundle by adding it to the list of registered bundles in the `config/bundles.php` file of your project:

```
return [
    /* ... */
    Pixel\FlashInfoBundle\FlashInfoBundle::class => ['all' => true],
];
```

### Update schema

[](#update-schema)

For the development environment:

```
bin/console do:sch:up --force
```

For the production environment: use doctrine migration

Bundle Config
-------------

[](#bundle-config)

Define the Admin Api Route in `routes_admin.yaml`

```
flash_info.flash_infos_api:
  type: rest
  prefix: /admin/api
  resource: pixel_flashinfo.flash-infos_route_controller
  name_prefix: flashinfo.

flash_info.setting_api:
  type: rest
  prefix: /admin/api
  resource: pixel_flashinfo.setting_route_controller
  name_prefix: flashinfo.
```

Define the Website Api Route in `routes_website.yaml`

```
flash_infos_auto:
  path: /flash-infos-auto
  controller: Pixel\FlashInfoBundle\Controller\Website\FlashInfoAutoController::flashInfosAuto

flash_infos_click:
  path: /flash-infos-click
  controller: Pixel\FlashInfoBundle\Controller\Website\FlashInfoClickController::flashInfosClick
```

Use
---

[](#use)

### Add/Edit a news flash

[](#addedit-a-news-flash)

To add a news flash, go to the "News flash" section and then, click on Add on the top of the page.

Once on the form, fill the following fields:

- Title (mandatory)
- Image
- Documents
- Start date (mandatory)
- End date (mandatory)
- Description (mandatory)
- Button label
- Link

[![](src/Resources/documentation/form_add.png)](src/Resources/documentation/form_add.png)

Click on "Save" to save your news flash. To enable it, click on the "Active?" button on the top of the page.

To edit a news flash, click on the pencil of the news flash you wish to edit. This will take you to the same form as the add one.

[![](src/Resources/documentation/list.png)](src/Resources/documentation/list.png)

### Remove/Restore

[](#removerestore)

There are 2 ways to delete a news flash:

- Go the edit form and click on the "Delete" button on the top of the page
- Check the news flash you want to delete and click on "Delete" on the top if the page

In both cases, the deleted news flash will be placed in the trash.

To restore a news flash, go to Settings &gt; Trash and select the news flash you want to restore (by clicking on the reverse clock on the left). After the restoration, you will be redirected to the edit for.

[![](src/Resources/documentation/trash.png)](src/Resources/documentation/trash.png)

To permanently delete a news flash, select it and click on the "Delete" button on the top of the page.

### Settings

[](#settings)

The settings allow you to set up how the news flash modal should be displayed. To access it, go to Settings &gt; Newsflash management. You will have two parameters:

- A select which allows you to define if the modal should be opened automatically and how many times. It has the following options:
    - Do not open: the modal is never opened automatically
    - Open once: the modal is open on the first visit of the site (stored in a cookie)
    - Open every time: the modal is opened each time during the user's visit
- A number input that is used to determine the cookie duration. By default, the duration is 30 days

[![](src/Resources/documentation/settings.png)](src/Resources/documentation/settings.png)

Display modal
-------------

[](#display-modal)

The modal will display the news flashes that are active with the current date in the period defined by the news flash.

The modal can be displayed automatically or by clicking a button.

### Add the automatic modal opening

[](#add-the-automatic-modal-opening)

To use the automatic opening news flash modal, add the auto\_display\_flash\_info\_modal function to the head tag.

This function don't take any parameter.

```

    {{ auto_display_flash_info_modal() }}

```

This Twig function will automatically display the modal according to the modal display policy (set in the settings) if there are published news flashes.

### Add the modal opening on click

[](#add-the-modal-opening-on-click)

To use the modal opening on click, you need to use the display\_flash\_info\_modal\_on\_click function.

This function must be placed in the head tag and takes one parameter:

- elementId: the id of the element that open the modal

```

    {{ display_flash_info_modal_on_click('flashInfo') }}

    Open the news flashes

```

This will display the modal no matter what the modal display policy is.

If there is no active news flash, an empty message will be shown.

Contributing
------------

[](#contributing)

You can contribute to this bundle. The only thing you must do is respect the coding standard we implement. You can find them in the `ecs.php` file.

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

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 ~7 days

Total

3

Last Release

569d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d2b87043ea111a9f5d76ffa990f48eea6e80576483c7bf33f0dcdd5a899c15c8?d=identicon)[pixeldev](/maintainers/pixeldev)

---

Top Contributors

[![matthieu2607](https://avatars.githubusercontent.com/u/14790414?v=4)](https://github.com/matthieu2607 "matthieu2607 (13 commits)")

---

Tags

sulu-bundlesulusulucms

###  Code Quality

Static AnalysisPHPStan

Code StyleECS

Type Coverage Yes

### Embed Badge

![Health badge](/badges/pixelopen-sulu-flashinfobundle/health.svg)

```
[![Health](https://phpackages.com/badges/pixelopen-sulu-flashinfobundle/health.svg)](https://phpackages.com/packages/pixelopen-sulu-flashinfobundle)
```

###  Alternatives

[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M151](/packages/sulu-sulu)[sulu/article-bundle

Bundle for managing localized content-rich entities like blog-posts in the Sulu content management system

66409.6k2](/packages/sulu-article-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)
