Moodle  2.2.1
http://www.collinsharper.com
portfolio_add_button Class Reference

Public Member Functions

 __construct ($options=null)
 set_callback_options ($class, array $argarray, $file=null)
 set_formats ($formats=null)
 reset_formats ()
 set_format_by_file (stored_file $file, $extraformats=null)
 set_format_by_intended_file ($extn, $extraformats=null)
 render ($format=null, $addstr=null)
 to_html ($format=null, $addstr=null)
 get_formats ()
 get_callbackargs ()
 get_callbackfile ()
 get_callbackclass ()

Detailed Description

Definition at line 81 of file portfoliolib.php.


Constructor & Destructor Documentation

__construct ( options = null)

constructor. either pass the options here or set them using the helper methods. generally the code will be clearer if you use the helper methods.

Parameters:
array$optionskeyed array of options: key 'callbackclass': name of the caller class (eg forum_portfolio_caller') key 'callbackargs': the array of callback arguments your caller class wants passed to it in the constructor key 'callbackfile': the file containing the class definition of your caller class. See set_callback_options for more information on these three. key 'formats': an array of PORTFOLIO_FORMATS this caller will support See set_formats or set_format_by_file for more information on this.

Definition at line 103 of file portfoliolib.php.

Here is the call graph for this function:


Member Function Documentation

Getter for $callbackargs property

Returns:
array

Definition at line 401 of file portfoliolib.php.

Getter for $callbackclass property

Returns:
array

Definition at line 417 of file portfoliolib.php.

Getter for $callbackfile property

Returns:
array

Definition at line 409 of file portfoliolib.php.

Getter for $format property

Returns:
array

Definition at line 393 of file portfoliolib.php.

render ( format = null,
addstr = null 
)

Definition at line 249 of file portfoliolib.php.

Here is the call graph for this function:

reset formats to the default which is usually what base_supported_formats returns

Definition at line 195 of file portfoliolib.php.

Here is the call graph for this function:

set_callback_options ( class,
array argarray,
file = null 
)

Definition at line 136 of file portfoliolib.php.

set_format_by_file ( stored_file file,
extraformats = null 
)

if we already know we have exactly one file, bypass set_formats and just pass the file so we can detect the formats by mimetype.

Parameters:
stored_file$filefile to set the format from
mixed$extraformatsany additional formats other than by mimetype eg leap2a etc

Definition at line 209 of file portfoliolib.php.

Here is the call graph for this function:

set_format_by_intended_file ( extn,
extraformats = null 
)

correllary to set_format_by_file, but this is used when we don't yet have a stored_file when we're writing out a new type of file (like csv or pdf)

Parameters:
string$extnthe file extension we intend to generate
mixed$extraformatsany additional formats other than by mimetype eg leap2a etc

Definition at line 228 of file portfoliolib.php.

Here is the call graph for this function:

set_formats ( formats = null)

Definition at line 177 of file portfoliolib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

to_html ( format = null,
addstr = null 
)

Definition at line 262 of file portfoliolib.php.

Here is the call graph for this function:

Here is the caller graph for this function:


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