|
Moodle
2.2.1
http://www.collinsharper.com
|
Go to the source code of this file.
| enum BLOCK_CONFIGURE |
Definition at line 38 of file blocklib.php.
| enum BLOCK_MOVE_DOWN |
Definition at line 37 of file blocklib.php.
| enum BLOCK_MOVE_LEFT |
| enum BLOCK_MOVE_RIGHT |
Definition at line 35 of file blocklib.php.
| enum BLOCK_MOVE_UP |
Definition at line 36 of file blocklib.php.
| enum BLOCK_POS_LEFT |
#@- #@+ Default names for the block regions in the standard theme.
Definition at line 44 of file blocklib.php.
| enum BLOCK_POS_RIGHT |
Definition at line 45 of file blocklib.php.
| enum BLOCKS_PINNED_BOTH |
Definition at line 53 of file blocklib.php.
| enum BLOCKS_PINNED_FALSE |
Definition at line 52 of file blocklib.php.
| enum BLOCKS_PINNED_TRUE |
| enum BUI_CONTEXTS_CURRENT |
Definition at line 60 of file blocklib.php.
Definition at line 61 of file blocklib.php.
Definition at line 58 of file blocklib.php.
#@-
Definition at line 56 of file blocklib.php.
Definition at line 57 of file blocklib.php.
| block_add_block_ui | ( | $ | page, |
| $ | output | ||
| ) |
Functions update the blocks if required by the request parameters ==========.
Return a block_contents representing the add a new block UI, if this user is allowed to see it.
Definition at line 1759 of file blocklib.php.


| block_instance | ( | $ | blockname, |
| $ | instance = NULL, |
||
| $ | page = NULL |
||
| ) |
Creates a new instance of the specified block class.
| string | $blockname | the name of the block. |
| $instance | block_instances DB table row (optional). | |
| moodle_page | $page | the page this block is appearing on. |
Definition at line 1520 of file blocklib.php.


| block_load_class | ( | $ | blockname | ) |
Load the block class for a particular type of block.
| string | $blockname | the name of the block. |
Definition at line 1542 of file blocklib.php.

| block_method_result | ( | $ | blockname, |
| $ | method, | ||
| $ | param = NULL |
||
| ) |
Helper functions for working with block classes ============================.
Call a class method (one that does not require a block instance) on a block class.
| string | $blockname | the name of the block. |
| string | $method | the method name. |
| array | $param | parameters to pass to the method. |
Definition at line 1505 of file blocklib.php.


| blocks_add_default_course_blocks | ( | $ | course | ) |
Add the default blocks to a course.
| object | $course | a course object. |
Definition at line 2075 of file blocklib.php.


Add the default system-context blocks. E.g. the admin tree.
Definition at line 2123 of file blocklib.php.


| blocks_delete_all_for_context | ( | $ | contextid | ) |
Delete all the blocks that belong to a particular context.
| int | $contextid | the context id. |
Definition at line 1898 of file blocklib.php.


| blocks_delete_all_on_page | ( | $ | pagetype, |
| $ | pageid | ||
| ) |
| string | $pagetype | the page type. |
| integer | $pageid | the page id. |
Definition at line 1947 of file blocklib.php.

| blocks_delete_instance | ( | $ | instance, |
| $ | nolongerused = false, |
||
| $ | skipblockstables = false |
||
| ) |
Delete a block, and associated data.
| object | $instance | a row from the block_instances table |
| bool | $nolongerused | legacy parameter. Not used, but kept for backwards compatibility. |
| bool | $skipblockstables | for internal use only. Makes |
Definition at line 1878 of file blocklib.php.


| blocks_find_block | ( | $ | blockid, |
| $ | blocksarray | ||
| ) |
Find a given block by its blockid within a provide array
| int | $blockid | |
| array | $blocksarray |
Definition at line 2011 of file blocklib.php.
Definition at line 2057 of file blocklib.php.


| blocks_get_missing | ( | &$ | page, |
| &$ | blockmanager | ||
| ) |
This function returns an array with the IDs of any blocks that you can add to your page. Parameters are passed by reference for speed; they are not modified at all.
| $page | the page object. |
| $blockmanager | Not used. |
Definition at line 1802 of file blocklib.php.

| blocks_get_record | ( | $ | blockid = NULL, |
| $ | notusedanymore = false |
||
| ) |
Get the block record for a particular blockid - that is, a particular type os block.
| $int | blockid block type id. If null, an array of all block types is returned. | |
| bool | $notusedanymore | No longer used. |
Definition at line 1992 of file blocklib.php.

| blocks_name_allowed_in_format | ( | $ | name, |
| $ | pageformat | ||
| ) |
Check that a given name is in a permittable format
| string | $name | |
| string | $pageformat |
Definition at line 1850 of file blocklib.php.


| blocks_parse_default_blocks_list | ( | $ | blocksstr | ) |
Parse a list of default blocks. See config-dist for a description of the format.
| string | $blocksstr |
Definition at line 2036 of file blocklib.php.

| blocks_remove_inappropriate | ( | $ | course | ) |
Actually delete from the database any blocks that are currently on this page, but which should not be there according to blocks_name_allowed_in_format.
| $course |
Definition at line 1819 of file blocklib.php.

| blocks_repopulate_page | ( | $ | page | ) |
Dispite what this function is called, it seems to be mostly used to populate the default blocks when a new course (or whatever) is created.
| object | $page | the page to add default blocks to. |
If the site override has been defined, it is the only valid one.
Definition at line 1965 of file blocklib.php.

| blocks_set_visibility | ( | $ | instance, |
| $ | page, | ||
| $ | newvisibility | ||
| ) |
Set a block to be visible or hidden on a particular page.
| object | $instance | a row from the block_instances, preferably LEFT JOINed with the block_positions table as return by block_manager. |
| moodle_page | $page | the back to set the visibility with respect to. |
| integer | $newvisibility | 1 for visible, 0 for hidden. |
Definition at line 1917 of file blocklib.php.

| default_page_type_list | ( | $ | pagetype, |
| $ | parentcontext = null, |
||
| $ | currentcontext = null |
||
| ) |
Generates a default page type list when a more appropriate callback cannot be decided upon.
| string | $pagetype | |
| stdClass | $parentcontext | |
| stdClass | $currentcontext |
Definition at line 1694 of file blocklib.php.


| generate_page_type_patterns | ( | $ | pagetype, |
| $ | parentcontext = null, |
||
| $ | currentcontext = null |
||
| ) |
Given a specific page type, parent context and currect context, return all the page type patterns that might be used by this block.
| string | $pagetype | for example 'course-view-weeks' or 'mod-quiz-view'. |
| stdClass | $parentcontext | Block's parent context |
| stdClass | $currentcontext | Current context of block |
Definition at line 1602 of file blocklib.php.


| matching_page_type_patterns | ( | $ | pagetype | ) |
Given a specific page type, return all the page type patterns that might match it.
| string | $pagetype | for example 'course-view-weeks' or 'mod-quiz-view'. |
Definition at line 1575 of file blocklib.php.

| mod_page_type_list | ( | $ | pagetype, |
| $ | parentcontext = null, |
||
| $ | currentcontext = null |
||
| ) |
Generates the page type list for a module by either locating and using the modules callback or by generating a default list.
| string | $pagetype | |
| stdClass | $parentcontext | |
| stdClass | $currentcontext |
Definition at line 1735 of file blocklib.php.
| my_page_type_list | ( | $ | pagetype, |
| $ | parentcontext = null, |
||
| $ | currentcontext = null |
||
| ) |
Generates the page type list for the my moodle page
| string | $pagetype | |
| stdClass | $parentcontext | |
| stdClass | $currentcontext |
Definition at line 1722 of file blocklib.php.