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

Static Public Member Functions

static mimetypes ()
static get_file_directory ()
static file_output ($file, $options=null)
static make_tag ($file, $path, $attributes)
static conflicts ($format)

Detailed Description

base class to inherit from do not use this anywhere in supported_formats

Definition at line 37 of file formats.php.


Member Function Documentation

static conflicts ( format) [static]

whether this format conflicts with the given format this is used for the case where an export location "generally" supports something like FORMAT_PLAINHTML but then in a specific export case, must add attachments which means that FORMAT_RICHHTML is supported in that case which implies removing support for FORMAT_PLAINHTML. Note that conflicts don't have to be bi-directional (eg FORMAT_PLAINHTML conflicts with FORMAT_RICHHTML but not the other way around) and things within the class hierarchy are resolved automatically anyway.

This is really just between subclasses of format_rich and subclasses of format_file.

Parameters:
string$formatone of the FORMAT_XX constants
Returns:
boolean

Reimplemented in portfolio_format_richhtml, portfolio_format_text, portfolio_format_plainhtml, and portfolio_format_image.

Definition at line 118 of file formats.php.

static file_output ( file,
options = null 
) [static]

given a file, return a snippet of markup in whatever format to link to that file. usually involves the path given by get_file_directory this is not supported in subclasses of portfolio_format_file since they're all just single files.

Parameters:
stored_file$file
array$optionsarray of options to pass. can contain: attributes => hash of existing html attributes (eg title, height, width, etc) and whatever the sub class adds into this list
Returns:
string some html or xml or whatever

Reimplemented in portfolio_format_leap2a, portfolio_format_richhtml, and portfolio_format_file.

Definition at line 69 of file formats.php.

static get_file_directory ( ) [static]

for multipart formats, eg html with attachments, we need to have a directory to place associated files in inside the zip file. this is the name of that directory

Reimplemented in portfolio_format_leap2a, portfolio_format_richhtml, and portfolio_format_file.

Definition at line 51 of file formats.php.

static make_tag ( file,
path,
attributes 
) [static]

Definition at line 73 of file formats.php.

Here is the call graph for this function:

Here is the caller graph for this function:

static mimetypes ( ) [static]

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