Moodle PHP Documentation 4.3
Moodle 4.3.5 (Build: 20240610) (7dcfaa79f78)
|
Namespaces | |
namespace | core_rss\privacy |
| |
Classes | |
class | core_rss\privacy\provider |
Privacy class for requesting user data. More... | |
class | core_rss_renderer |
Web service documentation renderer extending the plugin_renderer_base class. More... | |
Functions | |
rss_add_enclosures ($item) | |
Adds RSS Media Enclosures for "podcasting" by including attachments that are specified in the item->attachments field. | |
rss_add_http_header ($context, $componentname, $componentinstance, $title) | |
Build the URL for the RSS feed and add it as a header. | |
rss_add_items ($items) | |
Generates the rss XML code for every item passed in the array. | |
rss_delete_file ($componentname, $instance) | |
Given an object, deletes all RSS files associated with it. | |
rss_delete_token ($userid) | |
Removes the token for the given user from the DB. | |
rss_enabled_for_mod ($modname, $instance=null, $hasrsstype=true, $hasrssarticles=true) | |
Are RSS feeds enabled for the supplied module instance? | |
rss_end_tag ($tag, $level=0, $endline=true) | |
Return the xml end tag. | |
rss_full_tag ($tag, $level, $endline, $content, $attributes=null) | |
Return the while xml element, including content. | |
rss_get_file_full_name ($componentname, $filename) | |
Retrieve the location and file name of a cached RSS feed. | |
rss_get_file_name ($instance, $sql, $params=array()) | |
Construct the file name of the RSS File. | |
rss_get_link ($contextid, $userid, $componentname, $id, $tooltiptext='') | |
Print the link for the RSS feed with the correct RSS icon. | |
rss_get_token ($userid) | |
Get the RSS Token from a given user id. | |
rss_get_url ($contextid, $userid, $componentname, $additionalargs) | |
This function returns the URL for the RSS XML file. | |
rss_get_userid_from_token ($token) | |
Get the ID of the user from a given RSS Token. | |
rss_geterrorxmlfile ($errortype='rsserror') | |
This function return an error xml file (string) to be sent when a rss is required (file.php) and something goes wrong. | |
rss_print_link ($contextid, $userid, $componentname, $id, $tooltiptext='') | |
Print the link for the RSS feed with the correct RSS icon (Theme based) | |
rss_save_file ($componentname, $filename, $contents, $expandfilename=true) | |
This function saves to file the rss feed specified in the parameters. | |
rss_standard_footer () | |
This function return all the common footers for every rss feed in the site. | |
rss_standard_header ($title=NULL, $link=NULL, $description=NULL) | |
This function return all the common headers for every rss feed in the site. | |
rss_start_tag ($tag, $level=0, $endline=false, $attributes=null) | |
Return the xml start tag. | |
rss_add_enclosures | ( | $item | ) |
Adds RSS Media Enclosures for "podcasting" by including attachments that are specified in the item->attachments field.
stdClass | $item | representing an RSS item |
string | RSS enclosure tags |
rss_add_http_header | ( | $context, | |
$componentname, | |||
$componentinstance, | |||
$title ) |
Build the URL for the RSS feed and add it as a header.
stdClass | $context | The context under which the URL should be created |
string | $componentname | The name of the component for which the RSS feed exists |
stdClass | $componentinstance | The instance of the component |
string | $title | Name for the link to be added to the page header |
rss_add_items | ( | $items | ) |
Generates the rss XML code for every item passed in the array.
item->title: The title of the item item->author: The author of the item. Optional !! item->pubdate: The pubdate of the item item->link: The link url of the item item->description: The content of the item
array | $items | an array of item objects |
bool|string | the rss XML code for every item passed in the array |
rss_delete_file | ( | $componentname, | |
$instance ) |
Given an object, deletes all RSS files associated with it.
string | $componentname | the name of the module ie 'forum'. Used to construct the cache path. |
stdClass | $instance | An object with an id member variable ie $forum, $glossary. |
rss_delete_token | ( | $userid | ) |
Removes the token for the given user from the DB.
int | $userid | The user id for the token you wish to delete |
rss_enabled_for_mod | ( | $modname, | |
$instance = null, | |||
$hasrsstype = true, | |||
$hasrssarticles = true ) |
Are RSS feeds enabled for the supplied module instance?
string | $modname | The name of the module to be checked |
stdClass | $instance | An instance of an activity module ie $forum, $glossary. |
bool | $hasrsstype | Should there be a rsstype member variable? |
bool | $hasrssarticles | Should there be a rssarticles member variable? |
bool | whether or not RSS is enabled for the module |
rss_end_tag | ( | $tag, | |
$level = 0, | |||
$endline = true ) |
Return the xml end tag.
string | $tag | the xml tag name |
int | $level | the indentation level |
bool | $endline | whether or not to start new tags on a new line |
string | the xml end tag |
rss_full_tag | ( | $tag, | |
$level, | |||
$endline, | |||
$content, | |||
$attributes = null ) |
Return the while xml element, including content.
string | $tag | the xml tag name |
int | $level | the indentation level |
bool | $endline | whether or not to start new tags on a new line |
string | $content | the text to go inside the tag |
array | $attributes | the attributes of the xml tag |
string | the whole xml element |
rss_get_file_full_name | ( | $componentname, | |
$filename ) |
Retrieve the location and file name of a cached RSS feed.
string | $componentname | the name of the component the RSS feed is being created for |
string | $filename | the name of the RSS FEED |
string | The full name and path of the RSS file |
rss_get_file_name | ( | $instance, | |
$sql, | |||
$params = array() ) |
Construct the file name of the RSS File.
stdClass | $instance | the instance of the source of the RSS feed |
string | $sql | the SQL used to produce the RSS feed |
array | $params | the parameters used in the SQL query |
string | the name of the RSS file |
rss_get_link | ( | $contextid, | |
$userid, | |||
$componentname, | |||
$id, | |||
$tooltiptext = '' ) |
Print the link for the RSS feed with the correct RSS icon.
stdClass | $contextid | The id of the context under which the URL should be created |
int | $userid | The source of the RSS feed (site/course/group/user) |
string | $componentname | The name of the component for which the feed exists |
string | $id | The name by which to call the RSS File |
string | $tooltiptext | The tooltip to be displayed with the link |
string | HTML output for the RSS link |
rss_get_token | ( | $userid | ) |
Get the RSS Token from a given user id.
int | $userid | The user id |
string | the RSS token for the user |
rss_get_url | ( | $contextid, | |
$userid, | |||
$componentname, | |||
$additionalargs ) |
This function returns the URL for the RSS XML file.
int | $contextid | the course id |
int | $userid | the current user id |
string | $componentname | the name of the current component. For example "forum" |
string | $additionalargs | For modules, module instance id |
string | the url of the RSS feed |
rss_get_userid_from_token | ( | $token | ) |
Get the ID of the user from a given RSS Token.
string | $token | the RSS token you would like to use to find the user id |
int | The user id |
rss_geterrorxmlfile | ( | $errortype = 'rsserror' | ) |
This function return an error xml file (string) to be sent when a rss is required (file.php) and something goes wrong.
string | $errortype | Type of error to send, default is rsserror |
stdClass | returns a XML Feed with an error message in it |
rss_print_link | ( | $contextid, | |
$userid, | |||
$componentname, | |||
$id, | |||
$tooltiptext = '' ) |
Print the link for the RSS feed with the correct RSS icon (Theme based)
stdClass | $contextid | The id of the context under which the URL should be created |
int | $userid | The source of the RSS feed (site/course/group/user) |
string | $componentname | The name of the component for which the feed exists |
string | $id | The name by which to call the RSS File |
string | $tooltiptext | The tooltip to be displayed with the link |
rss_save_file | ( | $componentname, | |
$filename, | |||
$contents, | |||
$expandfilename = true ) |
This function saves to file the rss feed specified in the parameters.
string | $componentname | the module name ie forum. Used to create a cache directory. |
string | $filename | the name of the file to be created ie "rss.xml" |
string | $contents | the data to be written to the file |
bool | $expandfilename | whether or not the fullname of the RSS file should be used |
bool | whether the save was successful or not |
rss_standard_footer | ( | ) |
This function return all the common footers for every rss feed in the site.
string |
rss_standard_header | ( | $title = NULL, | |
$link = NULL, | |||
$description = NULL ) |
This function return all the common headers for every rss feed in the site.
string | $title | the title for the RSS Feed |
string | $link | the link for the origin of the RSS feed |
string | $description | the description of the contents of the RSS feed |
bool|string | the standard header for the RSS feed |
rss_start_tag | ( | $tag, | |
$level = 0, | |||
$endline = false, | |||
$attributes = null ) |
Return the xml start tag.
string | $tag | the xml tag name |
int | $level | the indentation level |
bool | $endline | whether or not to start new tags on a new line |
array | $attributes | the attributes of the xml tag |
string | the xml start tag |