This repository was archived by the owner on Sep 16, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,8 @@ Menu Documents
7
7
In accordance with the
8
8
:ref: `CMF bundle standards <contrib_bundles_baseandstandardimplementations >`
9
9
you are provided with two menu node implementations, a base document and a
10
- standard document.
10
+ standard document. Both exist in the ``Model `` namespace as storage agnostic
11
+ classes and in ``Doctrine\Phpcr `` with specific features for PHPCR-ODM.
11
12
12
13
Base Menu Node
13
14
--------------
@@ -20,11 +21,11 @@ the KnpMenu component documentation for more information.
20
21
21
22
use Symfony\Cmf\Bundle\MenuBundle\Doctrine\Phpcr\MenuNodeBase;
22
23
23
- $parent = ...;
24
+ // find the menu tree root
25
+ $mainMenu = $dm->find('Symfony\Cmf\Bundle\MenuBundle\Doctrine\Phpcr\Menu', '/cms/menu/main');
24
26
25
- // ODM specific
26
27
$node = new MenuNodeBase();
27
- $node->setParentDocument($parent );
28
+ $mainMenu->addChild($node );
28
29
$node->setName('home');
29
30
30
31
// Attributes are the HTML attributes of the DOM element representing the
@@ -63,6 +64,7 @@ The Standard Menu Node
63
64
The standard menu node supports the following CMF specific features
64
65
out-of-the-box:
65
66
67
+ * Methods to set and get parent document;
66
68
* Content association;
67
69
* Link type specification (URI, route or content);
68
70
* Standard :doc: `publish workflow <../core/publish_workflow >` integration;
You can’t perform that action at this time.
0 commit comments