Mercurial > hg > cmmr2012-drupal-site
comparison core/modules/views/src/ViewExecutable.php @ 5:12f9dff5fda9 tip
Update to Drupal core 8.7.1
author | Chris Cannam |
---|---|
date | Thu, 09 May 2019 15:34:47 +0100 |
parents | a9cd425dd02b |
children |
comparison
equal
deleted
inserted
replaced
4:a9cd425dd02b | 5:12f9dff5fda9 |
---|---|
923 */ | 923 */ |
924 public function initPager() { | 924 public function initPager() { |
925 if (!isset($this->pager)) { | 925 if (!isset($this->pager)) { |
926 $this->pager = $this->display_handler->getPlugin('pager'); | 926 $this->pager = $this->display_handler->getPlugin('pager'); |
927 | 927 |
928 if ($this->pager->usePager()) { | 928 if ($this->usePager()) { |
929 $this->pager->setCurrentPage($this->current_page); | 929 $this->pager->setCurrentPage($this->current_page); |
930 } | 930 } |
931 | 931 |
932 // These overrides may have been set earlier via $view->set_* | 932 // These overrides may have been set earlier via $view->set_* |
933 // functions. | 933 // functions. |
949 * | 949 * |
950 * @return array|string | 950 * @return array|string |
951 * The render array of the pager if it's set, blank string otherwise. | 951 * The render array of the pager if it's set, blank string otherwise. |
952 */ | 952 */ |
953 public function renderPager($exposed_input) { | 953 public function renderPager($exposed_input) { |
954 if (!empty($this->pager) && $this->pager->usePager()) { | 954 if ($this->usePager()) { |
955 return $this->pager->render($exposed_input); | 955 return $this->pager->render($exposed_input); |
956 } | 956 } |
957 | 957 |
958 return ''; | 958 return ''; |
959 } | 959 } |
1415 else { | 1415 else { |
1416 $cache = $this->display_handler->getPlugin('cache'); | 1416 $cache = $this->display_handler->getPlugin('cache'); |
1417 } | 1417 } |
1418 | 1418 |
1419 if ($cache->cacheGet('results')) { | 1419 if ($cache->cacheGet('results')) { |
1420 if ($this->pager->usePager()) { | 1420 if ($this->usePager()) { |
1421 $this->pager->total_items = $this->total_rows; | 1421 $this->pager->total_items = $this->total_rows; |
1422 $this->pager->updatePageInfo(); | 1422 $this->pager->updatePageInfo(); |
1423 } | 1423 } |
1424 } | 1424 } |
1425 else { | 1425 else { |
1468 $module_handler = \Drupal::moduleHandler(); | 1468 $module_handler = \Drupal::moduleHandler(); |
1469 | 1469 |
1470 // @TODO In the longrun, it would be great to execute a view without | 1470 // @TODO In the longrun, it would be great to execute a view without |
1471 // the theme system at all. See https://www.drupal.org/node/2322623. | 1471 // the theme system at all. See https://www.drupal.org/node/2322623. |
1472 $active_theme = \Drupal::theme()->getActiveTheme(); | 1472 $active_theme = \Drupal::theme()->getActiveTheme(); |
1473 $themes = array_keys($active_theme->getBaseThemes()); | 1473 $themes = array_keys($active_theme->getBaseThemeExtensions()); |
1474 $themes[] = $active_theme->getName(); | 1474 $themes[] = $active_theme->getName(); |
1475 | 1475 |
1476 // Check for already-cached output. | 1476 // Check for already-cached output. |
1477 /** @var \Drupal\views\Plugin\views\cache\CachePluginBase $cache */ | 1477 /** @var \Drupal\views\Plugin\views\cache\CachePluginBase $cache */ |
1478 if (!empty($this->live_preview)) { | 1478 if (!empty($this->live_preview)) { |