4 module "luci.dispatcher"
7 Build the URL relative to the server webroot from given virtual path.
11 @param ... Virtual path
16 Check whether a dispatch node shall be visible
20 @param node Dispatch node
21 @return Boolean indicating whether the node should be visible
25 Return a sorted table of visible children within a given node
29 @param node Dispatch node
30 @return Ordered table of child node names
34 Send a 404 error code and render the "error404" template if available.
38 @param message Custom error message (optional)
43 Send a 500 error code and render the "error500" template if available.
47 @param message Custom error message (optional)#
52 Dispatch an HTTP request.
56 @param request LuCI HTTP Request object
60 Dispatches a LuCI virtual path.
64 @param request Virtual path
68 Generate the dispatching index using the native file-cache based strategy.
76 Create the dispatching tree from the index.
78 Build the index before if it does not exist yet.
85 Register a tree modifier.
89 @param func Modifier function
90 @param order Modifier order value (optional)
94 Clone a node of the dispatching tree to another position.
98 @param path Virtual path destination
99 @param clone Virtual path source
100 @param title Destination node title (optional)
101 @param order Destination node order value (optional)
102 @return Dispatching tree node
106 Create a new dispatching node and define common parameters.
110 @param path Virtual path
111 @param target Target function to call when dispatched.
112 @param title Destination node title
113 @param order Destination node order value (optional)
114 @return Dispatching tree node
118 Fetch or create a dispatching node without setting the target module or
123 @param ... Virtual path
124 @return Dispatching tree node
128 Fetch or create a new dispatching node.
132 @param ... Virtual path
133 @return Dispatching tree node
137 Lookup node in dispatching tree.
141 @param ... Virtual path
142 @return Node object, canonical url or nil if the path was not found.
146 Alias the first (lowest order) page automatically
154 Create a redirect to another dispatching node.
158 @param ... Virtual path destination
162 Rewrite the first x path values of the request.
166 @param n Number of path values to replace
167 @param ... Virtual path to replace removed path values with
171 Create a function-call dispatching target.
175 @param name Target function of local controller
176 @param ... Additional parameters passed to the function
180 Create a template render dispatching target.
184 @param name Template to be rendered
188 Create a CBI model dispatching target.
192 @param model CBI model to be rendered
196 Create a combined dispatching target for non argv and argv requests.
200 @param trg1 Overview Target
201 @param trg2 Detail Target
205 Create a CBI form model dispatching target.
209 @param model CBI form model tpo be rendered
213 Access the luci.i18n translate() api.
217 @param text Text to translate
221 No-op function used to mark translation entries for menu labels.
223 This function does not actually translate the given argument but
224 is used by build/i18n-scan.pl to find translatable entries.