manuxi / sulu-extended-account-bundle
A Sulu bundle to extend the account entity with additional properties.
Package info
github.com/manuxi/SuluExtendedAccountBundle
Type:symfony-bundle
pkg:composer/manuxi/sulu-extended-account-bundle
Requires
- php: ^8.2
- doctrine/doctrine-bundle: ^2.13
- manuxi/sulu-admin-extras-bundle: ^1.4.1
- sulu/sulu: ^3.0
- symfony/config: ^6.2 | ^7.0
- symfony/dependency-injection: ^6.2 | ^7.0
- symfony/framework-bundle: ^6.2 | ^7.0
- symfony/http-foundation: ^6.2 | ^7.0
- symfony/http-kernel: ^6.2 | ^7.0
- symfony/intl: ^6.2 | ^7.0
- symfony/security-core: ^6.2 | ^7.0
- symfony/translation: ^6.2 | ^7.0
Requires (Dev)
- jackalope/jackalope-doctrine-dbal: ^1.3.4
- phpunit/phpunit: ^11.0
- symfony/browser-kit: ^6.2 | ^7.0
- symfony/console: ^6.2 | ^7.0
- symfony/phpunit-bridge: ^6.2 | ^7.0
README
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).
๐ 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:
- Installation - Full installation guide
- Features - Feature overview and Twig usage examples
๐งถ 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!

