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

Public Member Functions

 init ()
 preferred_width ()
 applicable_formats ()
 specialization ()
 get_content ()
 instance_allow_multiple ()
 has_config ()
 instance_allow_config ()
 get_feed_html ($feedrecord, $maxentries, $showtitle)
 get_item_html ($item)
 format_title ($title, $max=64)
 cron ()

Detailed Description

Definition at line 26 of file block_rss_client.php.


Member Function Documentation

Which page types this block may appear on.

The information returned here is processed by the blocks_name_allowed_in_format() function. Look there if you need to know exactly how this works.

Default case: everything except mod and tag.

Returns:
array page-type prefix => true/false.

Reimplemented from block_base.

Definition at line 36 of file block_rss_client.php.

cron ( )

cron - goes through all feeds and retrieves them with the cache duration set to 0 in order to force the retrieval of the item and refresh the cache

Returns:
boolean true if all feeds were retrieved succesfully

Definition at line 287 of file block_rss_client.php.

Here is the call graph for this function:

format_title ( title,
max = 64 
)

Strips a large title to size and adds ... if title too long

Parameters:
stringtitle to shorten
intmax character length of title
Returns:
string title s() quoted and shortened if necessary

Definition at line 268 of file block_rss_client.php.

Here is the call graph for this function:

Here is the caller graph for this function:

Parent class version of this function simply returns NULL This should be implemented by the derived class to return the content object.

Returns:
stdObject

Reimplemented from block_base.

Definition at line 51 of file block_rss_client.php.

Here is the call graph for this function:

get_feed_html ( feedrecord,
maxentries,
showtitle 
)

Returns the html of a feed to be displaed in the block

Parameters:
mixedfeedrecord The feed record from the database
intmaxentries The maximum number of entries to be displayed
booleanshowtitle Should the feed title be displayed in html
Returns:
string html representing the rss feed content

Definition at line 136 of file block_rss_client.php.

Here is the call graph for this function:

Here is the caller graph for this function:

get_item_html ( item)

Returns the html list item of a feed item

Parameters:
mixeditem simplepie_item representing the feed item
Returns:
string html li representing the rss feed item

Definition at line 217 of file block_rss_client.php.

Here is the call graph for this function:

Here is the caller graph for this function:

Subclasses should override this and return true if the subclass block has a config_global.html file.

Returns:
boolean

Reimplemented from block_base.

Definition at line 120 of file block_rss_client.php.

init ( )

Definition at line 28 of file block_rss_client.php.

Is each block of this type going to have instance-specific configuration? Normally, this setting is controlled by instance_allow_multiple(): if multiple instances are allowed, then each will surely need its own configuration. However, in some cases it may be necessary to provide instance configuration to blocks that do not want to allow multiple instances. In that case, make this function return true. I stress again that this makes a difference ONLY if instance_allow_multiple() returns false.

Returns:
boolean

Reimplemented from block_base.

Definition at line 124 of file block_rss_client.php.

Are you going to allow multiple instances of each block? If yes, then it is assumed that the block WILL USE per-instance configuration

Returns:
boolean

Reimplemented from block_base.

Definition at line 116 of file block_rss_client.php.

Default case: the block wants to be 180 pixels wide

Deprecated:
since Moodle 2.0.
Returns:
int

Reimplemented from block_base.

Definition at line 32 of file block_rss_client.php.

This function is called on your subclass right after an instance is loaded Use this function to act on instance data just after it's loaded and before anything else is done For instance: if your block will have different title's depending on location (site, course, blog, etc)

Reimplemented from block_base.

Definition at line 40 of file block_rss_client.php.


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