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

Public Member Functions

 __construct ($callbackargs)
 load_data ()
 expected_time ()
 get_sha1 ()
 prepare_package ()
 check_permissions ()
 __wakeup ()
 has_export_config ()
 export_config_form (&$mform, $instance)
 get_allowed_export_config ()

Static Public Member Functions

static expected_callbackargs ()
static display_name ()
static formats ($fields, $record)
static has_files ($data)
static base_supported_formats ()

Protected Attributes

 $recordid

Detailed Description

The class to handle entry exports of a database module

Definition at line 30 of file locallib.php.


Constructor & Destructor Documentation

__construct ( callbackargs)
Parameters:
array$callbackargsthe arguments passed through

Reimplemented from portfolio_caller_base.

Definition at line 63 of file locallib.php.


Member Function Documentation

__wakeup ( )

object

Returns:
bool|void

Definition at line 263 of file locallib.php.

static base_supported_formats ( ) [static]

base supported formats before we know anything about the export

Reimplemented from portfolio_caller_base.

Definition at line 375 of file locallib.php.

Verify the user can still export this entry

Returns:
bool

Reimplemented from portfolio_caller_base.

Definition at line 239 of file locallib.php.

Here is the call graph for this function:

static display_name ( ) [static]
Returns:
string

Reimplemented from portfolio_caller_base.

Definition at line 255 of file locallib.php.

static expected_callbackargs ( ) [static]

the required callback arguments for a single-record export

Returns:
array

Reimplemented from portfolio_caller_base.

Definition at line 53 of file locallib.php.

How long we think the export will take Single entry is probably not too long. But we check for filesizes Else base it on the number of records

Returns:
one of PORTFOLIO_TIME_XX constants

Reimplemented from portfolio_caller_base.

Definition at line 128 of file locallib.php.

Here is the call graph for this function:

export_config_form ( &$  mform,
instance 
)

if this caller wants any additional config items they should be defined here.

Parameters:
array$mformmoodleform object (passed by reference) to add elements to
object$instancesubclass of portfolio_plugin_base
integer$useridid of user exporting content

Reimplemented from portfolio_caller_base.

Definition at line 389 of file locallib.php.

Here is the call graph for this function:

static formats ( fields,
record 
) [static]

Given the fields being exported, and the single record, work out which export format(s) we can use

Parameters:
array$fieldsarray of field objects
object$recordThe data record object

PORTFOLIO_FORMAT_PLAINHTML PORTFOLIO_FORMAT_RICHHTML

Returns:
array of PORTFOLIO_XX constants

Definition at line 343 of file locallib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

Similar to the other allowed_config functions if you need export config, you must provide a list of what the fields are.

even if you want to store stuff during export without displaying a form to the user, you can use this.

Returns:
array array of allowed keys

Reimplemented from portfolio_caller_base.

Definition at line 397 of file locallib.php.

get_sha1 ( )

Calculate the shal1 of this export Dependent on the export format.

Returns:
string

Reimplemented from portfolio_caller_base.

Definition at line 141 of file locallib.php.

Here is the call graph for this function:

whether this caller wants any additional config during export (eg options or metadata)

Returns:
boolean

Reimplemented from portfolio_caller_base.

Definition at line 379 of file locallib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

static has_files ( data) [static]

Definition at line 359 of file locallib.php.

Here is the call graph for this function:

load_data ( )

load up the data needed for the export

object $DB

Reimplemented from portfolio_caller_base.

Definition at line 79 of file locallib.php.

Here is the call graph for this function:

Prepare the package for export

Returns:
stored_file object

Reimplemented from portfolio_caller_base.

Definition at line 173 of file locallib.php.

Here is the call graph for this function:


Field Documentation

$recordid [protected]

Definition at line 33 of file locallib.php.


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