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 Clone a node of the dispatching tree to another position.
89 @param path Virtual path destination
90 @param clone Virtual path source
91 @param title Destination node title (optional)
92 @param order Destination node order value (optional)
93 @return Dispatching tree node
97 Create a new dispatching node and define common parameters.
101 @param path Virtual path
102 @param target Target function to call when dispatched.
103 @param title Destination node title
104 @param order Destination node order value (optional)
105 @return Dispatching tree node
109 Fetch or create a dispatching node without setting the target module or
114 @param ... Virtual path
115 @return Dispatching tree node
119 Fetch or create a new dispatching node.
123 @param ... Virtual path
124 @return Dispatching tree node
128 Lookup node in dispatching tree.
132 @param ... Virtual path
133 @return Node object, canonical url or nil if the path was not found.
137 Alias the first (lowest order) page automatically
145 Create a redirect to another dispatching node.
149 @param ... Virtual path destination
153 Rewrite the first x path values of the request.
157 @param n Number of path values to replace
158 @param ... Virtual path to replace removed path values with
162 Create a function-call dispatching target.
166 @param name Target function of local controller
167 @param ... Additional parameters passed to the function
171 Create a template render dispatching target.
175 @param name Template to be rendered
179 Create a CBI model dispatching target.
183 @param model CBI model to be rendered
187 Create a combined dispatching target for non argv and argv requests.
191 @param trg1 Overview Target
192 @param trg2 Detail Target
196 Create a CBI form model dispatching target.
200 @param model CBI form model tpo be rendered
204 Access the luci.i18n translate() api.
208 @param text Text to translate
212 No-op function used to mark translation entries for menu labels.
214 This function does not actually translate the given argument but
215 is used by build/i18n-scan.pl to find translatable entries.