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

Public Member Functions

 __construct ($controller, array $params=null)
 destroy ()
 process ()
 save_controller ()
 display ()
 get_tasks ()
 get_stage ()
 get_stage_name ()
 get_uniqueid ()
 execute ()
 enforce_changed_dependencies ()
 cancel_process ()
 get_progress_bar ()
 get_format ()
 get_type ()
 get_controller ()
 get_controller_id ()
 get_setting ($name, $default=false)
 get_setting_value ($name, $default=false)
 get_name ()
 get_first_stage_id ()

Static Public Member Functions

static load_controller ($uniqueid=false)

Data Fields

const PROGRESS_INTIAL = 0
const PROGRESS_PROCESSED = 1
const PROGRESS_SAVED = 2
const PROGRESS_EXECUTED = 3

Protected Member Functions

 initialise_stage ($stage=null, array $params=null)
 enforce_dependencies ()

Protected Attributes

 $controller
 $stage
 $progress
 $dependencychanges = 0

Detailed Description

This is the backup user interface class

The backup user interface class manages the user interface and backup for Moodle.

Definition at line 35 of file base_ui.class.php.


Constructor & Destructor Documentation

__construct ( controller,
array params = null 
)

Yay for constructors

Parameters:
backup_controller$controller

Definition at line 68 of file base_ui.class.php.

Here is the call graph for this function:


Member Function Documentation

Cancels the current backup/restore and redirects the user back to the relevant place

Reimplemented in restore_ui.

Definition at line 231 of file base_ui.class.php.

Here is the call graph for this function:

destroy ( )

Destorys the backup controller and the loaded stage.

Definition at line 78 of file base_ui.class.php.

display ( )

Displays the UI for the backup!

Exceptions:
base_ui_exception
Returns:
string HTML code

Definition at line 146 of file base_ui.class.php.

Returns true if enforce_dependencies changed any settings

Returns:
bool

Reimplemented in restore_ui.

Definition at line 217 of file base_ui.class.php.

enforce_dependencies ( ) [protected]

Enforces dependencies on all settings. Call before save

Returns:
bool True if dependencies were enforced and changes were made

Definition at line 189 of file base_ui.class.php.

Here is the caller graph for this function:

execute ( ) [abstract]

Executes the backup plan

Returns:
bool

Reimplemented in restore_ui, and backup_ui.

Definition at line 261 of file base_ui.class.php.

Gets the ID used in creating the controller. Relates to course/section/cm

Returns:
int

Definition at line 268 of file base_ui.class.php.

get_first_stage_id ( ) [abstract]

Reimplemented in restore_ui, and backup_ui.

Here is the caller graph for this function:

Gets the format for the backup

Returns:
int

Definition at line 251 of file base_ui.class.php.

get_name ( ) [abstract]

Reimplemented in restore_ui, and backup_ui.

get_progress_bar ( ) [abstract]

Gets an array of progress bar items that can be displayed through the backup renderer.

Returns:
array Array of items for the progress bar

Reimplemented in restore_ui, backup_ui, and import_ui.

get_setting ( name,
default = false 
)

Gets the requested setting

Parameters:
string$name
Returns:
mixed

Definition at line 276 of file base_ui.class.php.

Here is the call graph for this function:

get_setting_value ( name,
default = false 
)

Gets the value for the requested setting

Parameters:
string$name
Returns:
mixed

Definition at line 290 of file base_ui.class.php.

Here is the call graph for this function:

Here is the caller graph for this function:

get_stage ( )

Gets the stage we are on

Returns:
int

Definition at line 165 of file base_ui.class.php.

Here is the caller graph for this function:

Gets the name of the stage we are on

Returns:
string

Definition at line 172 of file base_ui.class.php.

get_tasks ( )

Gets all backup tasks from the controller

Returns:
array Array of backup_task

Definition at line 156 of file base_ui.class.php.

get_type ( )

Gets the type of the backup

Returns:
int

Definition at line 258 of file base_ui.class.php.

get_uniqueid ( ) [abstract]

Gets the backup id from the controller

Returns:
string

Reimplemented in restore_ui, and backup_ui.

initialise_stage ( stage = null,
array params = null 
) [abstract, protected]

Intialises what ever stage is requested. If none are requested we check params for 'stage' and default to initial

Parameters:
int | null$stageThe desired stage to intialise or null for the default
Returns:
base_ui_stage

Reimplemented in import_ui, restore_ui, and backup_ui.

Here is the caller graph for this function:

static load_controller ( uniqueid = false) [static]

Loads the backup controller if we are tracking one

Returns:
backup_controller|false

Reimplemented in restore_ui, and backup_ui.

Definition at line 224 of file base_ui.class.php.

process ( )

This processes the current stage of the backup

Returns:
bool

Reimplemented in restore_ui.

Definition at line 98 of file base_ui.class.php.

Here is the call graph for this function:

Saves the backup controller.

Once this has been called nothing else can be changed in the controller.

Returns:
bool

Definition at line 127 of file base_ui.class.php.

Here is the call graph for this function:


Field Documentation

$controller [protected]

Definition at line 47 of file base_ui.class.php.

$dependencychanges = 0 [protected]

Definition at line 62 of file base_ui.class.php.

$progress [protected]

Definition at line 57 of file base_ui.class.php.

$stage [protected]

Reimplemented in restore_ui.

Definition at line 52 of file base_ui.class.php.

const PROGRESS_EXECUTED = 3

Definition at line 42 of file base_ui.class.php.

const PROGRESS_INTIAL = 0

The progress of this instance of the backup ui class

Definition at line 39 of file base_ui.class.php.

const PROGRESS_PROCESSED = 1

Definition at line 40 of file base_ui.class.php.

const PROGRESS_SAVED = 2

Definition at line 41 of file base_ui.class.php.


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