|
Moodle
2.2.1
http://www.collinsharper.com
|

Public Member Functions | |
| __construct ($id, $type=null) | |
Static Public Member Functions | |
| static | get_instance ($id, $type) |
Data Fields | |
| $availabletypes = array() | |
| $type | |
| $id | |
| $tables = array() | |
| $conditions = array() | |
| $params = array() | |
| $overrides = array() | |
Abstract class for blog_filter objects. A set of core filters are implemented here. To write new filters, you need to subclass blog_filter and give it the name of the type you want (for example, blog_filter_entry). The blog_filter abstract class will automatically use it when the filter is added to the URL. The first parameter of the constructor is the ID of your filter, but it can be a string or have any other meaning you wish it to have. The second parameter is called $type and is used as a sub-type for filters that have a very similar implementation (see blog_filter_context for an example)
Definition at line 914 of file locallib.php.
| __construct | ( | $ | id, |
| $ | type = null |
||
| ) |
Reimplemented in blog_filter_user, and blog_filter_context.
Definition at line 956 of file locallib.php.
| static get_instance | ( | $ | id, |
| $ | type | ||
| ) | [static] |
TODO This is poor design. A parent class should not know anything about its children. The default case helps to resolve this design issue
Definition at line 965 of file locallib.php.

An array of strings representing the available filter types for each blog_filter.
Definition at line 919 of file locallib.php.
An array of WHERE conditions
Reimplemented in blog_filter_entry.
Definition at line 943 of file locallib.php.
| int $id |
The unique ID for a filter's associated record
Definition at line 931 of file locallib.php.
| $overrides = array() |
An array of filter types which this particular filter type overrides: their conditions will not be evaluated
Reimplemented in blog_filter_entry.
Definition at line 954 of file locallib.php.
An array of SQL params
Definition at line 949 of file locallib.php.
An array of table aliases that are used in the WHERE conditions
Reimplemented in blog_filter_tag, and blog_filter_user.
Definition at line 937 of file locallib.php.
| string $type |
The type of filter (for example, types of blog_filter_context are site, course and module)
Definition at line 925 of file locallib.php.