From baa727de93db009f90d70a80a9861758a24eae77 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Tue, 5 Nov 2019 10:27:59 +0100 Subject: docs: rename documentation folder to docs Signed-off-by: Jo-Philipp Wich --- docs/api/modules/luci.dispatcher.html | 1145 +++++++++++++++++++++++++++++++++ 1 file changed, 1145 insertions(+) create mode 100644 docs/api/modules/luci.dispatcher.html (limited to 'docs/api/modules/luci.dispatcher.html') diff --git a/docs/api/modules/luci.dispatcher.html b/docs/api/modules/luci.dispatcher.html new file mode 100644 index 0000000000..ea33a5c706 --- /dev/null +++ b/docs/api/modules/luci.dispatcher.html @@ -0,0 +1,1145 @@ + + + + Reference + + + + + +
+ +
+ +
+
+
+ +
+ + + +
+ +

Class luci.dispatcher

+ +

+ + + + + + + +

Functions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
_ () + +No-op function used to mark translation entries for menu labels.
alias (...) + +Create a redirect to another dispatching node.
arcombine (trg1, trg2) + +Create a combined dispatching target for non argv and argv requests.
assign (path, clone, title, order) + +Clone a node of the dispatching tree to another position.
build_url (...) + +Build the URL relative to the server webroot from given virtual path.
call (name, ...) + +Create a function-call dispatching target.
cbi (model) + +Create a CBI model dispatching target.
createindex () + +Generate the dispatching index using the native file-cache based strategy.
createtree () + +Create the dispatching tree from the index.
dispatch (request) + +Dispatches a LuCI virtual path.
entry (path, target, title, order) + +Create a new dispatching node and define common parameters.
error404 (message) + +Send a 404 error code and render the "error404" template if available.
error500 (message) + +Send a 500 error code and render the "error500" template if available.
firstchild () + +Alias the first (lowest order) page automatically + +
form (model) + +Create a CBI form model dispatching target.
get (...) + +Fetch or create a dispatching node without setting the target module or +enabling the node.
httpdispatch (request) + +Dispatch an HTTP request.
lookup (...) + +Lookup node in dispatching tree.
node (...) + +Fetch or create a new dispatching node.
node_childs (node) + +Return a sorted table of visible children within a given node +
node_visible (node) + +Check whether a dispatch node shall be visible +
rewrite (n, ...) + +Rewrite the first x path values of the request.
template (name) + +Create a template render dispatching target.
translate (text) + +Access the luci.i18n translate() api.
+ + + + + + +
+
+ + +

Functions

+
+ + + +
_ ()
+
+ + +No-op function used to mark translation entries for menu labels. + +This function does not actually translate the given argument but +is used by build/i18n-scan.pl to find translatable entries. + + + + + + + + + + +
+ + + + +
alias (...)
+
+ + +Create a redirect to another dispatching node. + + + +

Parameters

+
    + +
  • + ...: Virtual path destination +
  • + +
+ + + + + + + + +
+ + + + +
arcombine (trg1, trg2)
+
+ + +Create a combined dispatching target for non argv and argv requests. + + + +

Parameters

+
    + +
  • + trg1: Overview Target +
  • + +
  • + trg2: Detail Target +
  • + +
+ + + + + + + + +
+ + + + +
assign (path, clone, title, order)
+
+ + +Clone a node of the dispatching tree to another position. + + + +

Parameters

+
    + +
  • + path: Virtual path destination +
  • + +
  • + clone: Virtual path source +
  • + +
  • + title: Destination node title (optional) +
  • + +
  • + order: Destination node order value (optional) +
  • + +
+ + + + + + +

Return value:

+Dispatching tree node + + + +
+ + + + +
build_url (...)
+
+ + +Build the URL relative to the server webroot from given virtual path. + + + +

Parameters

+
    + +
  • + ...: Virtual path +
  • + +
+ + + + + + +

Return value:

+Relative URL + + + +
+ + + + +
call (name, ...)
+
+ + +Create a function-call dispatching target. + + + +

Parameters

+
    + +
  • + name: Target function of local controller +
  • + +
  • + ...: Additional parameters passed to the function +
  • + +
+ + + + + + + + +
+ + + + +
cbi (model)
+
+ + +Create a CBI model dispatching target. + + + +

Parameters

+
    + +
  • + model: CBI model to be rendered +
  • + +
+ + + + + + + + +
+ + + + +
createindex ()
+
+ + +Generate the dispatching index using the native file-cache based strategy. + + + + + + + + + + + +
+ + + + +
createtree ()
+
+ + +Create the dispatching tree from the index. + +Build the index before if it does not exist yet. + + + + + + + + + + +
+ + + + +
dispatch (request)
+
+ + +Dispatches a LuCI virtual path. + + + +

Parameters

+
    + +
  • + request: Virtual path +
  • + +
+ + + + + + + + +
+ + + + +
entry (path, target, title, order)
+
+ + +Create a new dispatching node and define common parameters. + + + +

Parameters

+
    + +
  • + path: Virtual path +
  • + +
  • + target: Target function to call when dispatched. +
  • + +
  • + title: Destination node title +
  • + +
  • + order: Destination node order value (optional) +
  • + +
+ + + + + + +

Return value:

+Dispatching tree node + + + +
+ + + + +
error404 (message)
+
+ + +Send a 404 error code and render the "error404" template if available. + + + +

Parameters

+
    + +
  • + message: Custom error message (optional) +
  • + +
+ + + + + + +

Return value:

+false + + + +
+ + + + +
error500 (message)
+
+ + +Send a 500 error code and render the "error500" template if available. + + + +

Parameters

+
    + +
  • + message: Custom error message (optional)# +
  • + +
+ + + + + + +

Return value:

+false + + + +
+ + + + +
firstchild ()
+
+ + +Alias the first (lowest order) page automatically + + + + + + + + + + + +
+ + + + +
form (model)
+
+ + +Create a CBI form model dispatching target. + + + +

Parameters

+
    + +
  • + model: CBI form model tpo be rendered +
  • + +
+ + + + + + + + +
+ + + + +
get (...)
+
+ + +Fetch or create a dispatching node without setting the target module or +enabling the node. + + + +

Parameters

+
    + +
  • + ...: Virtual path +
  • + +
+ + + + + + +

Return value:

+Dispatching tree node + + + +
+ + + + +
httpdispatch (request)
+
+ + +Dispatch an HTTP request. + + + +

Parameters

+
    + +
  • + request: LuCI HTTP Request object +
  • + +
+ + + + + + + + +
+ + + + +
lookup (...)
+
+ + +Lookup node in dispatching tree. + + + +

Parameters

+
    + +
  • + ...: Virtual path +
  • + +
+ + + + + + +

Return value:

+Node object, canonical url or nil if the path was not found. + + + +
+ + + + +
node (...)
+
+ + +Fetch or create a new dispatching node. + + + +

Parameters

+
    + +
  • + ...: Virtual path +
  • + +
+ + + + + + +

Return value:

+Dispatching tree node + + + +
+ + + + +
node_childs (node)
+
+ + +Return a sorted table of visible children within a given node + + + +

Parameters

+
    + +
  • + node: Dispatch node +
  • + +
+ + + + + + +

Return value:

+Ordered table of child node names + + + +
+ + + + +
node_visible (node)
+
+ + +Check whether a dispatch node shall be visible + + + +

Parameters

+
    + +
  • + node: Dispatch node +
  • + +
+ + + + + + +

Return value:

+Boolean indicating whether the node should be visible + + + +
+ + + + +
rewrite (n, ...)
+
+ + +Rewrite the first x path values of the request. + + + +

Parameters

+
    + +
  • + n: Number of path values to replace +
  • + +
  • + ...: Virtual path to replace removed path values with +
  • + +
+ + + + + + + + +
+ + + + +
template (name)
+
+ + +Create a template render dispatching target. + + + +

Parameters

+
    + +
  • + name: Template to be rendered +
  • + +
+ + + + + + + + +
+ + + + +
translate (text)
+
+ + +Access the luci.i18n translate() api. + + + +

Parameters

+
    + +
  • + text: Text to translate +
  • + +
+ + + + + + + + +
+ + +
+ + + + + +
+ +
+ +
+

Valid XHTML 1.0!

+
+ +
+ + -- cgit v1.2.3