Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions src/Knp/Menu/Attribute/AsMenuBuilder.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

namespace Knp\Menu\Attribute;

/**
* A reusable attribute to help configure a class method as being a menu builder.
*
* Using it offers no guarantee: it needs to be leveraged by a KnpMenu third-party consumer.
*
* Using it with the KnpMenu library only has no effect at all: wiring the menu builder into
* the menu provider is expected to be handled by framework integrations.
*/
#[\Attribute(\Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)]
final class AsMenuBuilder
{
public function __construct(
public readonly string $name,
) {
}
}