X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=modules%2Fluci-base%2Fluasrc%2Fdispatcher.luadoc;fp=modules%2Fluci-base%2Fluasrc%2Fdispatcher.luadoc;h=743463c74f98ab5ee77927b9a4dec8544775ab4d;hp=0000000000000000000000000000000000000000;hb=84346cd178ca0740817edc6f81d8f90e7bc6e00c;hpb=cf7e2695cc676dff02561a1a45d6de8140170b17 diff --git a/modules/luci-base/luasrc/dispatcher.luadoc b/modules/luci-base/luasrc/dispatcher.luadoc new file mode 100644 index 000000000..743463c74 --- /dev/null +++ b/modules/luci-base/luasrc/dispatcher.luadoc @@ -0,0 +1,220 @@ +---[[ +LuCI web dispatcher. +]] +module "luci.dispatcher" + +---[[ +Build the URL relative to the server webroot from given virtual path. + +@class function +@name build_url +@param ... Virtual path +@return Relative URL +]] + +---[[ +Check whether a dispatch node shall be visible + +@class function +@name node_visible +@param node Dispatch node +@return Boolean indicating whether the node should be visible +]] + +---[[ +Return a sorted table of visible childs within a given node + +@class function +@name node_childs +@param node Dispatch node +@return Ordered table of child node names +]] + +---[[ +Send a 404 error code and render the "error404" template if available. + +@class function +@name error404 +@param message Custom error message (optional) +@return false +]] + +---[[ +Send a 500 error code and render the "error500" template if available. + +@class function +@name error500 +@param message Custom error message (optional)# +@return false +]] + +---[[ +Dispatch an HTTP request. + +@class function +@name httpdispatch +@param request LuCI HTTP Request object +]] + +---[[ +Dispatches a LuCI virtual path. + +@class function +@name dispatch +@param request Virtual path +]] + +---[[ +Generate the dispatching index using the native file-cache based strategy. + + +@class function +@name createindex +]] + +---[[ +Create the dispatching tree from the index. + +Build the index before if it does not exist yet. + +@class function +@name createtree +]] + +---[[ +Register a tree modifier. + +@class function +@name modifier +@param func Modifier function +@param order Modifier order value (optional) +]] + +---[[ +Clone a node of the dispatching tree to another position. + +@class function +@name assign +@param path Virtual path destination +@param clone Virtual path source +@param title Destination node title (optional) +@param order Destination node order value (optional) +@return Dispatching tree node +]] + +---[[ +Create a new dispatching node and define common parameters. + +@class function +@name entry +@param path Virtual path +@param target Target function to call when dispatched. +@param title Destination node title +@param order Destination node order value (optional) +@return Dispatching tree node +]] + +---[[ +Fetch or create a dispatching node without setting the target module or + +enabling the node. +@class function +@name get +@param ... Virtual path +@return Dispatching tree node +]] + +---[[ +Fetch or create a new dispatching node. + +@class function +@name node +@param ... Virtual path +@return Dispatching tree node +]] + +---[[ +Alias the first (lowest order) page automatically + + +@class function +@name firstchild +]] + +---[[ +Create a redirect to another dispatching node. + +@class function +@name alias +@param ... Virtual path destination +]] + +---[[ +Rewrite the first x path values of the request. + +@class function +@name rewrite +@param n Number of path values to replace +@param ... Virtual path to replace removed path values with +]] + +---[[ +Create a function-call dispatching target. + +@class function +@name call +@param name Target function of local controller +@param ... Additional parameters passed to the function +]] + +---[[ +Create a template render dispatching target. + +@class function +@name template +@param name Template to be rendered +]] + +---[[ +Create a CBI model dispatching target. + +@class function +@name cbi +@param model CBI model to be rendered +]] + +---[[ +Create a combined dispatching target for non argv and argv requests. + +@class function +@name arcombine +@param trg1 Overview Target +@param trg2 Detail Target +]] + +---[[ +Create a CBI form model dispatching target. + +@class function +@name form +@param model CBI form model tpo be rendered +]] + +---[[ +Access the luci.i18n translate() api. + +@class function +@name translate +@param text Text to translate +]] + +---[[ +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. + +@class function +@name _ +]] +