|
returns(It can be html, xml, an array, etc.But if it does not return html, you have to provide a transformer capableto produce html from the data get_content produces.The arguments are passed as a reference, because the get_content functioncan change them, and they can get stored automatically as session variable.This is because the parent module provides one other service: Your modulecan rely on an automatic handling of HTTP GET, POST and COOKIE variables,and of session variables.All you'd have to do is to define the arrays $this->get, $this->post, $this->cookie and $this->session.All members of these variables will be fetched from the GET, POST or COOKIEparameters, or from session variables and stored for you in the $argumentsarray.The entries of $this->session additionnaly will be stored after get_contentreturns to get_output.This can be very useful if you want your module to remain in a stable statewhile the user interacts with other modules on the same page.\begin_deeper \layout StandardThe variables you define in these arrays can be identical to those in $this->arguments.In this case, if they are defined in the HTTP session context, they willoverride the values the page contributor has defined for the page.But they can be different variables that do not need an initial value providedby the page contributor.Whereas $this->get,$this->cookie and $this->session are simple arrays enumerating the variable names, $this->post is special because it can contain theelement definition in the same way as $this->arguments, which can be usedto programatically construct the form elements.\layout StandardYour module does not need to use this service, it could directly read HTTPvariables.The advantage of using it is that it provides a namespace for each module,so that if different modules that use the same variable names are usedon the same page, no problems occur.If you use this service you can construct URLS automatically with the moduleslink function (see below)
X-Ref
|