|
Moodle
2.2.1
http://www.collinsharper.com
|
Public Member Functions | |
| load_lesson_types (lesson $lesson) | |
| get_page_type_strings ($type=null, $special=true) | |
| get_page_type_idstring ($id) | |
| load_page ($pageid, lesson $lesson) | |
| load_all_pages (lesson $lesson) | |
| get_page_form ($type, $arguments) | |
| get_add_page_type_links ($previd) | |
Static Public Member Functions | |
| static | get (lesson $lesson) |
Protected Attributes | |
| $types = array() | |
A management class for page types
This class is responsible for managing the different pages. A manager object can be retrieved by calling the following line of code: $manager = lesson_page_type_manager::get($lesson); The first time the page type manager is retrieved the it includes all of the different page types located in mod/lesson/pagetypes.
Definition at line 2586 of file locallib.php.
Retrieves the lesson page type manager object
If the object hasn't yet been created it is created here.
lesson_page_type_manager $pagetypemanager
| lesson | $lesson |
Definition at line 2603 of file locallib.php.

| get_add_page_type_links | ( | $ | previd | ) |
Returns an array of links to use as add page links
| int | $previd | The id of the previous page |
Definition at line 2750 of file locallib.php.
| get_page_form | ( | $ | type, |
| $ | arguments | ||
| ) |
Fetches an mform that can be used to create/edit an page
| int | $type | The id for the page type |
| array | $arguments | Any arguments to pass to the mform |
Definition at line 2734 of file locallib.php.

| get_page_type_idstring | ( | $ | id | ) |
Returns the basic string used to identify a page type provided with an id
This string can be used to instantiate or identify the page type class. If the page type id is unknown then 'unknown' is returned
| int | $id |
Definition at line 2660 of file locallib.php.
| get_page_type_strings | ( | $ | type = null, |
| $ | special = true |
||
| ) |
Returns an array of strings to describe the loaded page types
| int | $type | Can be used to return JUST the string for the requested type |
Definition at line 2641 of file locallib.php.
| load_all_pages | ( | lesson $ | lesson | ) |
This function loads ALL pages that belong to the lesson.
| lesson | $lesson |
Definition at line 2696 of file locallib.php.

| load_lesson_types | ( | lesson $ | lesson | ) |
Finds and loads all lesson page types in mod/lesson/pagetypes
| lesson | $lesson |
Definition at line 2617 of file locallib.php.
Loads a page for the provided lesson given it's id
This function loads a page from the lesson when given both the lesson it belongs to as well as the page's id. If the page doesn't exist an error is thrown
| int | $pageid | The id of the page to load |
| lesson | $lesson | The lesson the page belongs to |
Definition at line 2680 of file locallib.php.

$types = array() [protected] |
Definition at line 2592 of file locallib.php.