silverstripe-blog/code/widgets/SubscribeRSSWidget.php
Damian Mooyman f4b51f0a0e BUG / Housekeeping of Widget code:
- TagCloudWidget not wrapped with if(class_exists('Widget')) check for dependency module
- Default titles for RSS Widget and TagCloudWidget not being translated.
- Fixed poor indentation, and excessive line length (scrutinizer errors)
- Removal of several blank 'private static $relation = array()' that added no value
- Missing PHPDoc for widget classes
- Fixed missing EOL and removed closing ?> from php files for consistency
2013-08-15 09:24:10 +12:00

34 lines
721 B
PHP

<?php
if(class_exists('Widget')) {
/**
* A simple widget that just shows a link
* to this website's blog RSS, with an RSS
* icon.
*
* @package blog
*/
class SubscribeRSSWidget extends Widget {
private static $title = 'Subscribe via RSS';
private static $cmsTitle = 'Subscribe via RSS widget';
private static $description = 'Shows a link allowing a user to subscribe to this blog via RSS.';
/**
* Return an absolute URL based on the BlogHolder
* that this widget is located on.
*
* @return string
*/
function getRSSLink() {
Requirements::themedCSS('subscribersswidget');
$container = BlogTree::current();
if ($container) return $container->Link('rss');
}
}
}