Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Contains block_rss_client

Copyright: Daryl Hawes
License: http://www.gnu.org/copyleft/gpl.html GNU GPL
File Size: 304 lines (11 kb)
Included or required: 1 time
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

block_rss_client:: (11 methods):
  init()
  applicable_formats()
  specialization()
  get_footer()
  get_content()
  instance_allow_multiple()
  has_config()
  instance_allow_config()
  get_feed()
  format_title()
  get_config_for_external()


Class: block_rss_client  - X-Ref

A block which displays Remote feeds

init()   X-Ref
No description

applicable_formats()   X-Ref
No description

specialization()   X-Ref
No description

get_footer($feedrecords)   X-Ref
Gets the footer, which is the channel link of the last feed in our list of feeds

param: array $feedrecords The feed records from the database.
return: block_rss_client\output\footer|null The renderable footer or null if none should be displayed.

get_content()   X-Ref
No description

instance_allow_multiple()   X-Ref
No description

has_config()   X-Ref
No description

instance_allow_config()   X-Ref
No description

get_feed($feedrecord, $maxentries, $showtitle)   X-Ref
Returns the html of a feed to be displaed in the block

param: mixed feedrecord The feed record from the database
param: int maxentries The maximum number of entries to be displayed
param: boolean showtitle Should the feed title be displayed in html
return: block_rss_client\output\feed|null The renderable feed or null of there is an error

format_title($title,$max=64)   X-Ref
Strips a large title to size and adds ... if title too long
This function does not escape HTML entities, so they have to be escaped
before being passed here.

param: string title to shorten
param: int max character length of title
return: string title shortened if necessary

get_config_for_external()   X-Ref
Return the plugin config settings for external functions.

return: stdClass the configs for both the block instance and plugin