diff --git a/core/modules/block_content/src/Plugin/views/area/ListingEmpty.php b/core/modules/block_content/src/Plugin/views/area/ListingEmpty.php index 778c91a..0e25190 100644 --- a/core/modules/block_content/src/Plugin/views/area/ListingEmpty.php +++ b/core/modules/block_content/src/Plugin/views/area/ListingEmpty.php @@ -47,6 +47,8 @@ class ListingEmpty extends AreaPluginBase { * The plugin implementation definition. * @param \Drupal\Core\Access\AccessManagerInterface $access_manager * The access manager. + * @param \Drupal\Core\Session\AccountInterface $current_user + * The current user. */ public function __construct(array $configuration, $plugin_id, $plugin_definition, AccessManagerInterface $access_manager, AccountInterface $current_user) { parent::__construct($configuration, $plugin_id, $plugin_definition); @@ -73,7 +75,7 @@ public static function create(ContainerInterface $container, array $configuratio */ public function render($empty = FALSE) { if (!$empty || !empty($this->options['empty'])) { - /** @var \Drupal\Core\Access\AccessResultInterface|\Drupal\Core\Cache\CacheableInterface $access_result */ + /** @var \Drupal\Core\Access\AccessResultInterface|\Drupal\Core\Cache\CacheableDependencyInterface $access_result */ $access_result = $this->accessManager->checkNamedRoute('block_content.add_page', array(), $this->currentUser, TRUE); $element = array( '#markup' => $this->t('Add a custom block.', array('!url' => Url::fromRoute('block_content.add_page')->toString())), diff --git a/core/modules/block_content/src/Tests/BlockContentListViewsTest.php b/core/modules/block_content/src/Tests/BlockContentListViewsTest.php index c9c8fa5..ba84f2b 100644 --- a/core/modules/block_content/src/Tests/BlockContentListViewsTest.php +++ b/core/modules/block_content/src/Tests/BlockContentListViewsTest.php @@ -6,7 +6,6 @@ */ namespace Drupal\block_content\Tests; -use Drupal\Core\Url; /** * Tests the Views-powered listing of custom blocks.