core/modules/help/src/Plugin/Block/HelpBlock.php | 27 ++++++++-------------- .../src/Plugin/Block/StatisticsPopularBlock.php | 21 ----------------- 2 files changed, 10 insertions(+), 38 deletions(-) diff --git a/core/modules/help/src/Plugin/Block/HelpBlock.php b/core/modules/help/src/Plugin/Block/HelpBlock.php index d86c1c7..0b07264 100644 --- a/core/modules/help/src/Plugin/Block/HelpBlock.php +++ b/core/modules/help/src/Plugin/Block/HelpBlock.php @@ -28,13 +28,6 @@ class HelpBlock extends BlockBase implements ContainerFactoryPluginInterface, NonLazyBuildableBlockPluginInterface { /** - * Stores the help text associated with the active menu item. - * - * @var string - */ - protected $help; - - /** * The module handler. * * @var \Drupal\Core\Extension\ModuleHandlerInterface @@ -97,13 +90,7 @@ public static function create(ContainerInterface $container, array $configuratio * {@inheritdoc} */ protected function blockAccess(AccountInterface $account) { - $this->help = $this->getActiveHelp($this->request); - if ($this->help) { - return AccessResult::allowed(); - } - else { - return AccessResult::forbidden(); - } + return AccessResult::allowed(); } /** @@ -126,9 +113,15 @@ protected function getActiveHelp(Request $request) { * {@inheritdoc} */ public function build() { - return array( - '#children' => $this->help, - ); + $help = $this->getActiveHelp($this->request); + if (!$help) { + return []; + } + else { + return [ + '#children' => $help, + ]; + } } /** diff --git a/core/modules/statistics/src/Plugin/Block/StatisticsPopularBlock.php b/core/modules/statistics/src/Plugin/Block/StatisticsPopularBlock.php index 85b9de3..621f6cf 100644 --- a/core/modules/statistics/src/Plugin/Block/StatisticsPopularBlock.php +++ b/core/modules/statistics/src/Plugin/Block/StatisticsPopularBlock.php @@ -23,27 +23,6 @@ class StatisticsPopularBlock extends BlockBase { /** - * Number of day's top views to display. - * - * @var int - */ - protected $day_list; - - /** - * Number of all time views to display. - * - * @var int - */ - protected $all_time_list; - - /** - * Number of most recent views to display. - * - * @var int - */ - protected $last_list; - - /** * {@inheritdoc} */ public function defaultConfiguration() {