1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<?php
declare(strict_types=1);
namespace Laminas\View\Helper\Navigation;
use Laminas\Navigation;
use Laminas\Permissions\Acl;
use Laminas\View\Exception\ExceptionInterface;
use Laminas\View\Helper\HelperInterface as BaseHelperInterface;
/**
* Interface for navigational helpers
*/
interface HelperInterface extends BaseHelperInterface
{
/**
* Magic overload: Should proxy to {@link render()}.
*
* @return string
*/
public function __toString();
/**
* Renders helper
*
* @param string|Navigation\AbstractContainer $container [optional] container to render.
* Default is null, which indicates
* that the helper should render
* the container returned by {@link
* getContainer()}.
* @return string helper output
* @throws ExceptionInterface
*/
public function render($container = null);
/**
* Sets ACL to use when iterating pages
*
* @param Acl\AclInterface $acl|null [optional] ACL instance
* @return HelperInterface
*/
public function setAcl(?Acl\AclInterface $acl = null);
/**
* Returns ACL or null if it isn't set using {@link setAcl()} or
* {@link setDefaultAcl()}
*
* @return Acl\AclInterface|null
*/
public function getAcl();
/**
* Checks if the helper has an ACL instance
*
* @return bool
*/
public function hasAcl();
/**
* Sets navigation container the helper should operate on by default
*
* @param string|Navigation\AbstractContainer $container [optional] container to operate
* on. Default is null, which
* indicates that the container
* should be reset.
* @return HelperInterface
*/
public function setContainer($container = null);
/**
* Returns the navigation container the helper operates on by default
*
* @return Navigation\AbstractContainer navigation container
*/
public function getContainer();
/**
* Checks if the helper has a container
*
* @return bool
*/
public function hasContainer();
/**
* Render invisible items?
*
* @param bool $renderInvisible [optional] boolean flag
* @return HelperInterface
*/
public function setRenderInvisible($renderInvisible = true);
/**
* Return renderInvisible flag
*
* @return bool
*/
public function getRenderInvisible();
/**
* Sets ACL role to use when iterating pages
*
* @param mixed $role [optional] role to set. Expects a string, an
* instance of type {@link Acl\Role}, or null. Default
* is null.
* @throws ExceptionInterface If $role is invalid.
* @return HelperInterface
*/
public function setRole($role = null);
/**
* Returns ACL role to use when iterating pages, or null if it isn't set
*
* @return string|Acl\Role\RoleInterface|null
*/
public function getRole();
/**
* Checks if the helper has an ACL role
*
* @return bool
*/
public function hasRole();
/**
* Sets whether ACL should be used
*
* @param bool $useAcl [optional] whether ACL should be used. Default is true.
* @return HelperInterface
*/
public function setUseAcl($useAcl = true);
/**
* Returns whether ACL should be used
*
* @return bool
*/
public function getUseAcl();
}