We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b528141 + 6860980 commit 5a43a48Copy full SHA for 5a43a48
src/Knp/Menu/Attribute/AsMenuBuilder.php
@@ -0,0 +1,20 @@
1
+<?php
2
+
3
+namespace Knp\Menu\Attribute;
4
5
+/**
6
+ * A reusable attribute to help configure a class method as being a menu builder.
7
+ *
8
+ * Using it offers no guarantee: it needs to be leveraged by a KnpMenu third-party consumer.
9
10
+ * Using it with the KnpMenu library only has no effect at all: wiring the menu builder into
11
+ * the menu provider is expected to be handled by framework integrations.
12
+ */
13
+#[\Attribute(\Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)]
14
+final class AsMenuBuilder
15
+{
16
+ public function __construct(
17
+ public readonly string $name,
18
+ ) {
19
+ }
20
+}
0 commit comments