manuxi/sulu-extended-account-bundle

A Sulu bundle to extend the account entity with additional properties.

Maintainers

Package info

github.com/manuxi/SuluExtendedAccountBundle

Type:symfony-bundle

pkg:composer/manuxi/sulu-extended-account-bundle

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 0

v1.0.0 2026-02-18 23:57 UTC

This package is auto-updated.

Last update: 2026-03-18 12:19:51 UTC


README

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

English | ๐Ÿ‡ฉ๐Ÿ‡ช Deutsch

A Sulu bundle to extend the account entity with company data, business hours, public holidays and company holidays.

Note: This bundle replaces the former manuxi/sulu-additional-account-data-bundle (SuluAdditionalAccountDataBundle).

Company data

Openings

๐Ÿ“‹ Prerequisites

  • PHP 8.2 or higher
  • Sulu CMS 3.0 or higher
  • Symfony 6.2 / 7.0 or higher
  • SuluAdminExtrasBundle (installed automatically as a dependency)

๐Ÿ‘ฉ๐Ÿปโ€๐Ÿญ Installation

Step 1: Install the package

composer require manuxi/sulu-extended-account-bundle

If you are not using Symfony Flex, register the bundle in config/bundles.php:

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

Step 2: Configure routing

Add the following to config/routes/routes_admin.yaml:

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

Step 3: Update database schema

# Preview the required SQL changes
php bin/console doctrine:schema:update --dump-sql

# Apply the changes
php bin/console doctrine:schema:update --force

Important: Make sure you only process the schema updates related to this bundle.

Step 4: Admin assets setup

The opening hours features (business hours, public holidays, company holidays) use content types from the SuluAdminExtrasBundle. Their JavaScript components must be registered in your admin assets.

A) Update assets/admin/package.json

Add the dependency for the AdminExtrasBundle:

{
    "dependencies": {
        "sulu-admin-extras-bundle": "file:../../vendor/manuxi/sulu-admin-extras-bundle/src/Resources"
    }
}

B) Update assets/admin/app.js

Import the bundle:

import 'sulu-admin-extras-bundle';

C) Install & Build

cd assets/admin
npm install
npm run build

For detailed instructions see the Installation Guide.

โœจ Features

Company Data

  • Commercial register number, registry court, descriptor and claim

Opening Hours

  • Weekly business hours schedule with time slots and breaks
  • Public holidays via Nager.Date API integration
  • Company holidays / closure periods

Twig Functions

The bundle provides Twig functions for frontend use:

Function Returns Description
is_open_now(accountId) bool Whether the account is currently open
get_business_hours(accountId) array Full weekly schedule
get_today_hours(accountId) array|null Today's hours
is_holiday(accountId) bool Whether today is a holiday

See Features for usage examples.

๐Ÿ“– Documentation

Detailed documentation in the docs/ directory:

๐Ÿงถ Configuration

No additional configuration is required at this time.

๐Ÿ‘ฉโ€๐Ÿณ Contributing

Contributions are welcome! Please create issues or pull requests. Feedback to improve the bundle is always welcome.

๐Ÿ“ License

This bundle is released under the MIT License.

๐ŸŽ‰ Credits

Created and maintained by manuxi.

Thanks to the Sulu team for the great CMS and the fantastic support!