class Rss
Same name in this branch
- 9 core/modules/node/src/Plugin/views/row/Rss.php \Drupal\node\Plugin\views\row\Rss
- 9 core/modules/views/src/Plugin/views/style/Rss.php \Drupal\views\Plugin\views\style\Rss
- 9 core/modules/comment/src/Plugin/views/row/Rss.php \Drupal\comment\Plugin\views\row\Rss
Same name and namespace in other branches
- 11.x core/modules/node/src/Plugin/views/row/Rss.php \Drupal\node\Plugin\views\row\Rss
- 11.x core/modules/views/src/Plugin/views/style/Rss.php \Drupal\views\Plugin\views\style\Rss
- 11.x core/modules/comment/src/Plugin/views/row/Rss.php \Drupal\comment\Plugin\views\row\Rss
- 10 core/modules/node/src/Plugin/views/row/Rss.php \Drupal\node\Plugin\views\row\Rss
- 10 core/modules/views/src/Plugin/views/style/Rss.php \Drupal\views\Plugin\views\style\Rss
- 10 core/modules/comment/src/Plugin/views/row/Rss.php \Drupal\comment\Plugin\views\row\Rss
- 8.9.x core/modules/node/src/Plugin/views/row/Rss.php \Drupal\node\Plugin\views\row\Rss
- 8.9.x core/modules/views/src/Plugin/views/style/Rss.php \Drupal\views\Plugin\views\style\Rss
- 8.9.x core/modules/aggregator/src/Plugin/views/row/Rss.php \Drupal\aggregator\Plugin\views\row\Rss
- 8.9.x core/modules/comment/src/Plugin/views/row/Rss.php \Drupal\comment\Plugin\views\row\Rss
Defines a row plugin which loads an aggregator item and renders as RSS.
Plugin annotation
@ViewsRow(
id = "aggregator_rss",
theme = "views_view_row_rss",
title = @Translation("Aggregator item"),
help = @Translation("Display the aggregator item using the data from the original source."),
base = {"aggregator_item"},
display_types = {"feed"}
)
Hierarchy
- class \Drupal\Component\Plugin\PluginBase extends \Drupal\Component\Plugin\PluginInspectionInterface, \Drupal\Component\Plugin\DerivativeInspectionInterface
- class \Drupal\Core\Plugin\PluginBase uses \Drupal\Core\StringTranslation\StringTranslationTrait, \Drupal\Core\DependencyInjection\DependencySerializationTrait, \Drupal\Core\Messenger\MessengerTrait implements \Drupal\Component\Plugin\PluginBase
- class \Drupal\views\Plugin\views\PluginBase extends \Drupal\Core\Plugin\ContainerFactoryPluginInterface, \Drupal\views\Plugin\views\ViewsPluginInterface, \Drupal\Component\Plugin\DependentPluginInterface, \Drupal\Core\Security\TrustedCallbackInterface implements \Drupal\Core\Plugin\PluginBase
- class \Drupal\views\Plugin\views\row\RowPluginBase implements \Drupal\views\Plugin\views\PluginBase
- class \Drupal\views\Plugin\views\row\RssPluginBase implements \Drupal\views\Plugin\views\row\RowPluginBase
- class \Drupal\aggregator\Plugin\views\row\Rss implements \Drupal\views\Plugin\views\row\RssPluginBase
- class \Drupal\views\Plugin\views\row\RssPluginBase implements \Drupal\views\Plugin\views\row\RowPluginBase
- class \Drupal\views\Plugin\views\row\RowPluginBase implements \Drupal\views\Plugin\views\PluginBase
- class \Drupal\views\Plugin\views\PluginBase extends \Drupal\Core\Plugin\ContainerFactoryPluginInterface, \Drupal\views\Plugin\views\ViewsPluginInterface, \Drupal\Component\Plugin\DependentPluginInterface, \Drupal\Core\Security\TrustedCallbackInterface implements \Drupal\Core\Plugin\PluginBase
- class \Drupal\Core\Plugin\PluginBase uses \Drupal\Core\StringTranslation\StringTranslationTrait, \Drupal\Core\DependencyInjection\DependencySerializationTrait, \Drupal\Core\Messenger\MessengerTrait implements \Drupal\Component\Plugin\PluginBase
Expanded class hierarchy of Rss
41 string references to 'Rss'
- AggregatorRenderingTest::testFeedPage in core/
modules/ aggregator/ tests/ src/ Functional/ AggregatorRenderingTest.php - Creates a feed and checks that feed's page.
- book_node_links_alter in core/
modules/ book/ book.module - Implements hook_node_links_alter().
- CommentLinkBuilder::buildCommentedEntityLinks in core/
modules/ comment/ src/ CommentLinkBuilder.php - CommentLinkBuilderTest::getLinkCombinations in core/
modules/ comment/ tests/ src/ Unit/ CommentLinkBuilderTest.php - Data provider for ::testCommentLinkBuilder.
- comment_entity_view in core/
modules/ comment/ comment.module - Implements hook_entity_view().
File
-
core/
modules/ aggregator/ src/ Plugin/ views/ row/ Rss.php, line 19
Namespace
Drupal\aggregator\Plugin\views\rowView source
class Rss extends RssPluginBase {
/**
* The table the aggregator item is using for storage.
*
* @var string
*/
public $base_table = 'aggregator_item';
/**
* The actual field which is used to identify an aggregator item.
*
* @var string
*/
public $base_field = 'iid';
/**
* {@inheritdoc}
*/
protected $entityTypeId = 'aggregator_item';
/**
* {@inheritdoc}
*/
public function render($row) {
$entity = $row->_entity;
$item = new \stdClass();
foreach ($entity as $name => $field) {
$item->{$name} = $field->value;
}
$item->elements = [
[
'key' => 'pubDate',
// views_view_row_rss takes care about the escaping.
'value' => gmdate('r', $entity->timestamp->value),
],
[
'key' => 'dc:creator',
// views_view_row_rss takes care about the escaping.
'value' => $entity->author->value,
],
[
'key' => 'guid',
// views_view_row_rss takes care about the escaping.
'value' => $entity->guid->value,
'attributes' => [
'isPermaLink' => 'false',
],
],
];
$build = [
'#theme' => $this->themeFunctions(),
'#view' => $this->view,
'#options' => $this->options,
'#row' => $item,
];
return $build;
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.