diff --git a/core/modules/node/src/Plugin/views/row/Rss.php b/core/modules/node/src/Plugin/views/row/Rss.php index 72127fe..37261c1 100644 --- a/core/modules/node/src/Plugin/views/row/Rss.php +++ b/core/modules/node/src/Plugin/views/row/Rss.php @@ -9,8 +9,6 @@ use Drupal\Component\Utility\SafeMarkup; use Drupal\Core\Entity\EntityManagerInterface; -use Drupal\Core\Plugin\ContainerFactoryPluginInterface; -use Drupal\Core\Render\RendererInterface; use Drupal\views\Plugin\views\row\RssPluginBase; use Symfony\Component\DependencyInjection\ContainerInterface; use Drupal\node\NodeStorageInterface; @@ -29,7 +27,7 @@ * display_types = {"feed"} * ) */ -class Rss extends RssPluginBase implements ContainerFactoryPluginInterface { +class Rss extends RssPluginBase { // Basic properties that let the row style follow relationships. var $base_table = 'node_field_data'; @@ -62,32 +60,15 @@ class Rss extends RssPluginBase implements ContainerFactoryPluginInterface { * The plugin implementation definition. * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager * The entity manager. - * @param \Drupal\Core\Render\RendererInterface $renderer - * The renderer. */ - public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityManagerInterface $entity_manager, RendererInterface $renderer) { + public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityManagerInterface $entity_manager) { parent::__construct($configuration, $plugin_id, $plugin_definition, $entity_manager); $this->nodeStorage = $entity_manager->getStorage('node'); - $this->renderer = $renderer; } /** * {@inheritdoc} */ - public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) { - return new static( - $configuration, - $plugin_id, - $plugin_definition, - $container->get('entity.manager'), - $container->get('renderer') - ); - } - - - /** - * {@inheritdoc} - */ public function buildOptionsForm_summary_options() { $options = parent::buildOptionsForm_summary_options(); $options['title'] = $this->t('Title only'); diff --git a/core/modules/views/src/Element/View.php b/core/modules/views/src/Element/View.php index 935f665..4308c47 100644 --- a/core/modules/views/src/Element/View.php +++ b/core/modules/views/src/Element/View.php @@ -76,6 +76,8 @@ public static function preRenderViewElement($element) { } if (empty($view->display_handler->getPluginDefinition()['returns_response'])) { + // views_add_contextual_links() needs the following information in + // order to be attached to the view. $element['#view_id'] = $view->storage->id(); $element['#view_display_show_admin_links'] = $view->getShowAdminLinks(); $element['#view_display_plugin_id'] = $view->display_handler->getPluginId(); diff --git a/core/modules/views/src/Plugin/Block/ViewsBlockBase.php b/core/modules/views/src/Plugin/Block/ViewsBlockBase.php index fd5878d..853fe79 100644 --- a/core/modules/views/src/Plugin/Block/ViewsBlockBase.php +++ b/core/modules/views/src/Plugin/Block/ViewsBlockBase.php @@ -203,7 +203,8 @@ protected function addContextualLinks(&$output, $block_type = 'block') { $output = array('#markup' => $output); } - // Add the contextual links. + // views_add_contextual_links() needs the following information in + // order to be attached to the view. $output['#view_id'] = $this->view->storage->id(); $output['#view_display_show_admin_links'] = $this->view->getShowAdminLinks(); $output['#view_display_plugin_id'] = $this->view->display_handler->getPluginId(); diff --git a/core/modules/views/src/ViewExecutable.php b/core/modules/views/src/ViewExecutable.php index d5d2781..31981a9 100644 --- a/core/modules/views/src/ViewExecutable.php +++ b/core/modules/views/src/ViewExecutable.php @@ -511,9 +511,8 @@ public function addCacheContext($cache_context) { public function setCurrentPage($page) { $this->current_page = $page; - // Calls like ::unserialize() might setup a $page might call this method - // without a proper $page. - if ($page) { + // Calls like ::unserialize() might call this method without a proper $page. + if ($page !== NULL) { $this->element['#cache']['keys'][] = 'page:' . $page; }