Moodle  2.2.1
http://www.collinsharper.com
core_renderer_ajax Class Reference
Inheritance diagram for core_renderer_ajax:
Collaboration diagram for core_renderer_ajax:

Public Member Functions

 fatal_error ($message, $moreinfourl, $link, $backtrace, $debuginfo=null)
 notification ($message, $classes= 'notifyproblem')
 redirect_message ($encodedurl, $message, $delay, $debugdisableredirect)
 header ()
 footer ()
 heading ($text, $level=2, $classes= 'main', $id=null)

Detailed Description

A renderer that generates output for ajax scripts.

This renderer prevents accidental sends back only json encoded error messages, all other output is ignored.

Since:
Moodle 2.0

Definition at line 2660 of file outputrenderers.php.


Member Function Documentation

fatal_error ( message,
moreinfourl,
link,
backtrace,
debuginfo = null 
)

Returns a template fragment representing a fatal error.

Parameters:
string$messageThe message to output
string$moreinfourlURL where more info can be found about the error
string$linkLink for the Continue button
array$backtraceThe execution backtrace
string$debuginfoDebugging information
Returns:
string A template fragment for a fatal error

Reimplemented from core_renderer.

Definition at line 2670 of file outputrenderers.php.

Here is the call graph for this function:

footer ( )

Outputs the page's footer

Returns:
string HTML fragment

Reimplemented from core_renderer.

Definition at line 2716 of file outputrenderers.php.

header ( )

Start output by sending the HTTP headers, and printing the HTML <head> and the start of the <body>.

To control what is printed, you should set properties on $PAGE. If you are familiar with the old print_header() function from Moodle 1.9 you will find that there are properties on $PAGE that correspond to most of the old parameters to could be passed to print_header.

Not that, in due course, the remaining $navigation, $menu parameters here will be replaced by more properties of $PAGE, but that is still to do.

Returns:
string HTML that you must output this, preferably immediately.

Do NOT use, please use <?php echo $OUTPUT->main_content() ?> in layout files instead.

Deprecated:

Headers to make it not cacheable and json

Reimplemented from core_renderer.

Definition at line 2699 of file outputrenderers.php.

Here is the caller graph for this function:

heading ( text,
level = 2,
classes = 'main',
id = null 
)

Outputs a heading

Parameters:
string$textThe text of the heading
int$levelThe level of importance of the heading. Defaulting to 2
string$classesA space-separated list of CSS classes
string$idAn optional ID
Returns:
string the HTML to output.

Reimplemented from core_renderer.

Definition at line 2719 of file outputrenderers.php.

notification ( message,
classes = 'notifyproblem' 
)

Output a notification (that is, a status message about something that has just happened).

Parameters:
string$messagethe message to print out
string$classesnormally 'notifyproblem' or 'notifysuccess'.
Returns:
string the HTML to output.

Reimplemented from core_renderer.

Definition at line 2693 of file outputrenderers.php.

redirect_message ( encodedurl,
message,
delay,
debugdisableredirect 
)

Redirects the user by any means possible given the current state

This function should not be called directly, it should always be called using the redirect function in lib/weblib.php

The redirect function should really only be called before page output has started however it will allow itself to be called during the state STATE_IN_BODY

Parameters:
string$encodedurlThe URL to send to encoded if required
string$messageThe message to display to the user if any
int$delayThe delay before redirecting a user, if $message has been set this is a requirement and defaults to 3, set to 0 no delay
boolean$debugdisableredirectthis redirect has been disabled for debugging purposes. Display a message that explains, and don't trigger the redirect.
Returns:
string The HTML to display to the user before dying, may contain meta refresh, javascript refresh, and may have set header redirects

Reimplemented from core_renderer.

Definition at line 2696 of file outputrenderers.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations