Moodle PHP Documentation 5.1
Moodle 5.1dev (Build: 20250711) (9addea9f0ac)
block_rss_client\output\feed Class Reference

Class to help display an RSS Feed. More...

Inheritance diagram for block_rss_client\output\feed:

Public Member Functions

 __construct ($title, $showtitle=true, $showimage=true, ?string $channellink=null)
 Contructor.
 
 add_item (item $item)
 Add an RSS item.
 
 export_for_template (\renderer_base $output)
 Export this for use in a mustache template context.
 
 get_image ()
 Get the channel image.
 
 get_items ()
 Get the RSS items.
 
 get_showimage ()
 Get showimage.
 
 get_showtitle ()
 Get showtitle.
 
 get_title ()
 Get the feed title.
 
 set_channellink (?\moodle_url $channellink)
 Set the feed channel link.
 
 set_image (channel_image $image)
 Set the channel image.
 
 set_items (array $items)
 Set the RSS items.
 
 set_showimage ($showimage)
 Set showimage.
 
 set_showtitle ($showtitle)
 Set showtitle.
 
 set_title ($title)
 Set the feed title.
 

Protected Attributes

string null string $channellink
 The feed's channel link.
 
channel_image $image = null
 The channel image.
 
array $items = array()
 An array of renderable feed items.
 
boolean $showimage
 Whether or not to show the channel image.
 
boolean $showtitle
 Whether or not to show the title.
 
string $title = null
 The feed's title.
 

Detailed Description

Class to help display an RSS Feed.

Author
Brendan Anderson brend.nosp@m.an_a.nosp@m.nders.nosp@m.on@h.nosp@m.cpss..nosp@m.org
License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Constructor & Destructor Documentation

◆ __construct()

block_rss_client\output\feed::__construct ( $title,
$showtitle = true,
$showimage = true,
?string $channellink = null )

Contructor.

Parameters
string$titleThe title of the RSS feed
boolean$showtitleWhether to show the title
boolean$showimageWhether to show the channel image
string | null$channellinkThe channel link of the RSS feed

Member Function Documentation

◆ add_item()

block_rss_client\output\feed::add_item ( item $item)

Add an RSS item.

Parameters
block_rss_client\output\item$item

◆ export_for_template()

block_rss_client\output\feed::export_for_template ( \renderer_base $output)

Export this for use in a mustache template context.

See also
templatable::export_for_template()
Parameters
renderer_base$output
Return values
array

◆ get_image()

block_rss_client\output\feed::get_image ( )

Get the channel image.

Return values
channel_image

◆ get_items()

block_rss_client\output\feed::get_items ( )

Get the RSS items.

Return values
arrayAn array of renderable RSS items

◆ get_showimage()

block_rss_client\output\feed::get_showimage ( )

Get showimage.

Return values
boolean

◆ get_showtitle()

block_rss_client\output\feed::get_showtitle ( )

Get showtitle.

Return values
boolean

◆ get_title()

block_rss_client\output\feed::get_title ( )

Get the feed title.

Return values
string

◆ set_channellink()

block_rss_client\output\feed::set_channellink ( ?\moodle_url $channellink)

Set the feed channel link.

Parameters
moodle_url | null$channellinkthe URL to the channel website.

◆ set_image()

block_rss_client\output\feed::set_image ( channel_image $image)

Set the channel image.

Parameters
block_rss_client\output\channel_image$image

◆ set_items()

block_rss_client\output\feed::set_items ( array $items)

Set the RSS items.

Parameters
array$itemsAn array of renderable RSS items

◆ set_showimage()

block_rss_client\output\feed::set_showimage ( $showimage)

Set showimage.

Parameters
boolean$showimage
Return values
block_rss_client\output\feed

◆ set_showtitle()

block_rss_client\output\feed::set_showtitle ( $showtitle)

Set showtitle.

Parameters
boolean$showtitle
Return values
block_rss_client\output\feed

◆ set_title()

block_rss_client\output\feed::set_title ( $title)

Set the feed title.

Parameters
string$title
Return values
block_rss_client\output\feed

The documentation for this class was generated from the following file: