You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A menu, or navigation container, is a class implementing the \RecursiveIterator interface. It has a hierarchical structure, with nodes called pages(see the `Page` class) that may have children. It is basically a tree
37
+
A menu, or navigation container, is a class implementing the \RecursiveIterator interface.
38
+
It has a hierarchical structure, with nodes called pages (see the `Page` class) that may have children.
39
+
It is basically a tree.
38
40
39
-
A Page extends the NavigationContainer class. The NavigationContainer is the top most node which represents the entire menu. The children of this node are Page instances that defines each navigation item.
41
+
A Page extends the NavigationContainer class.
42
+
The NavigationContainer is the top most node which represents the entire menu.
43
+
The children of this node are Page instances that define each navigation item.
40
44
41
-
A page has a reference to its parent, and can have options and attributes. There are no limitation on what is accepted as options or attributes.
45
+
A page has a reference to its parent and can have options and attributes.
46
+
There is no limitation on what is accepted as options or attributes.
42
47
43
-
Options can be any piece of information that describes a page. Some predefined options exists, in order for the navigation module to work seamlessly with other dot modules.
48
+
Options can be any piece of information that describes a page.
49
+
Some predefined options exist in order for the navigation module to work seamlessly with other dot modules.
44
50
45
-
Attributes are key value pairs that defines the menu item. They are usually inserted as html attributes when parsing the menu, but of course, this is implementation specific.
51
+
Attributes are key value pairs that define the menu item.
52
+
They are usually inserted as HTML attributes when parsing the menu, but of course, this is implementation-specific.
46
53
47
-
A `NavigationService` class, is the service that handles all defined menu container. It can fetch the container from its provider, check if a page is active or not and get the page's generated URI.
54
+
A `NavigationService` class, is the service that handles all defined menu containers.
55
+
It can fetch the container from its provider, check if a page is active or not, and get the page's generated URI.
48
56
49
57
## Container providers
50
58
51
-
Each menu can be created from different sources. The responsibility of creating a menu container from the source falls on a container provider.
59
+
Each menu can be created from different sources.
60
+
The responsibility of creating a menu container from the source falls on a container provider.
52
61
53
62
Each provider must implement the interface `ProviderInterface` and be registered in the ProviderPluginManager.
54
63
55
64
We offer just one provider for now, `ArrayProvider`, that is able to fetch and create a menu container from a php array that is defined in the configuration file.
56
65
57
66
## NavigationRenderer
58
67
59
-
Used to render the navigation container in a displayable format. It can render a simple HTML ul list or use a partial template, to render the menu in a template engine.
68
+
Used to render the navigation container in a displayable format.
69
+
It can render a simple HTML ul list or use a partial template to render the menu in a template engine.
60
70
61
71
The partial method is usually the more flexible one, custom rules can be defined and checked in the template.
62
72
63
-
If you are using twig, there is already a twig extension provided in package dot-twigrenderer, that you can use to easily parse the menus inside your templates
73
+
If you are using twig, there is already a twig extension provided in package `dotkerel/dot-twigrenderer`, that you can use to easily parse the menus inside your templates.
64
74
65
-
When using the partial method, the template will receive as parameters the container, the navigation service and any extra parameters set by the developer.
75
+
When using the partial method, the template will receive as parameters the container, the navigation service, and any extra parameters set by the developer.
66
76
67
-
Navigation containers are referred, when parsed, by their name, as defined in the configuration file.
77
+
Navigation containers are referred to, when parsed, by their name, as defined in the configuration file.
68
78
69
79
## Required page options and attributes
70
80
71
81
The following are options that each page should define in the configuration
72
82
73
83
*`label` - the text of the menu item
74
84
*`route` or `uri` - defines the route or link the menu item will have
75
-
*`permission` - can be used optionally, if authorization service is present, in order to omit menu items that are not authorized to visit.
85
+
*`permission` - can be used optionally if authorization service is present, to omit menu items that are not authorized to visit.
| 3.x |:white_check_mark:||
8
+
| <= 2.x |:x:||
10
9
11
10
## Reporting Potential Security Issues
12
11
13
-
If you have encountered a potential security vulnerability in this project,
14
-
please report it to us at <security@dotkernel.com>. We will work with you to
15
-
verify the vulnerability and patch it.
12
+
If you have encountered a potential security vulnerability in this project, please report it to us at <security@dotkernel.com>.
13
+
We will work with you to verify the vulnerability and patch it.
16
14
17
15
When reporting issues, please provide the following information:
18
16
19
17
- Component(s) affected
20
18
- A description indicating how to reproduce the issue
21
19
- A summary of the security vulnerability and impact
22
20
23
-
We request that you contact us via the email address above and give the
24
-
project contributors a chance to resolve the vulnerability and issue a new
25
-
release prior to any public exposure; this helps protect the project's
26
-
users, and provides them with a chance to upgrade and/or update in order to
27
-
protect their applications.
28
-
21
+
We request that you contact us via the email address above and give the project contributors a chance to resolve the vulnerability and issue a new release prior to any public exposure;
22
+
this helps protect the project's users and provides them with a chance to upgrade and/or update to protect their applications.
29
23
30
24
## Policy
31
25
32
26
If we verify a reported security vulnerability, our policy is:
33
27
34
-
- We will patch the current release branch, as well as the immediate prior minor
35
-
release branch.
36
-
37
-
- After patching the release branches, we will immediately issue new security
38
-
fix releases for each patched release branch.
39
-
28
+
- We will patch the current release branch, as well as the immediate prior minor release branch.
29
+
- After patching the release branches, we will immediately issue new security fix releases for each patched release branch.
0 commit comments