friendsofsulu / sulu-attributes-bundle
There is no license information available for the latest version (0.1.0) of this package.
Bundle to expand Sulu with helpful attributes
Package info
github.com/FriendsOfSulu/SuluAttributesBundle
Type:sulu-bundle
pkg:composer/friendsofsulu/sulu-attributes-bundle
0.1.0
2026-03-16 11:39 UTC
Requires
- php: ^8.2 || ^8.3
- sulu/sulu: >=2.6
- symfony/config: ^4.4 || ^5.4 || ^6.3 || ^7.0
- symfony/dependency-injection: ^4.4 || ^5.4 || ^6.3 || ^7.0
- symfony/framework-bundle: ^4.4 || ^5.4 || ^6.3 || ^7.0
- symfony/http-foundation: ^4.4 || ^5.4 || ^6.3 || ^7.0
- symfony/http-kernel: ^4.4 || ^5.4 || ^6.3 || ^7.0
Requires (Dev)
- jackalope/jackalope-doctrine-dbal: ^1.3.4 || ^2.0
- php-cs-fixer/shim: ^3.65
- phpstan/phpstan: ^2.0
- phpunit/phpunit: ^10.5
- symfony/phpunit-bridge: ^5.4 || ^6.0 || ^7.0
This package is auto-updated.
Last update: 2026-03-16 15:55:10 UTC
README
Symfony is using using Attributes for configuring parts of your application. This bundle adds Attributes for Sulu features so no more searching for which configuration to extend.
🛠️ Installation Steps:
composer require friendsofsulu/sulu-attributes-bundle
🧐 Features
He're some of the project's features:
#[SuluResourceRoutes] for configuring routes on the admin class
Before
resources: events: routes: list: app.get_event_list detail: app.get_event
After
<?php #[SuluResourcesRoutes( 'events', [ 'list' => 'app.get_event_list', 'details' => 'app.get_event' ] )] class EventAdmin {}
#[SuluNavigationItem] for configuring navigation items
Before
<?php use Sulu\Bundle\AdminBundle\Admin\Navigation\NavigationItem; use Sulu\Bundle\AdminBundle\Admin\Navigation\NavigationItemCollection; class ActivityAdmin extends Admin { public function configureNavigationItems(NavigationItemCollection $navigationItemCollection): void { if ($this->securityChecker->hasPermission(static::SECURITY_CONTEXT, PermissionTypes::VIEW)) { $activitiesNavigationItem = new NavigationItem('sulu_activity.activities'); $activitiesNavigationItem->setPosition(100); $activitiesNavigationItem->setView(static::LIST_VIEW); $navigationItemCollection->get(Admin::SETTINGS_NAVIGATION_ITEM)->addChild($activitiesNavigationItem); } } // ... }
After
<?php use FriendsOfSulu\Bundle\SuluAttributesBundle\Attributes\SuluNavigationItem; #[SuluNavigationItem( title: 'sulu_activity.activities', position: 100, view: self::LIST_VIEW, permission: [self::SECURITY_CONTEXT, PermissionTypes::VIEW], parentName: Admin::SETTINGS_NAVIGATION_ITEM, )] class ActivityAdmin extends Admin { }