Skip to content
Snippets Groups Projects

Resolve #3461097 "Move navigationshortcutsblock to shortcut"

1 unresolved thread
Files
2
@@ -2,7 +2,7 @@
@@ -2,7 +2,7 @@
declare(strict_types=1);
declare(strict_types=1);
namespace Drupal\navigation\Plugin\Block;
namespace Drupal\shortcut\Plugin\Block;
use Drupal\Core\Access\AccessResult;
use Drupal\Core\Access\AccessResult;
use Drupal\Core\Access\AccessResultInterface;
use Drupal\Core\Access\AccessResultInterface;
@@ -18,8 +18,6 @@
@@ -18,8 +18,6 @@
* Defines a shortcuts navigation block class.
* Defines a shortcuts navigation block class.
*
*
* @internal
* @internal
*
* @todo Move to Shortcut module as part of the core MR process.
*/
*/
#[Block(
#[Block(
id: 'navigation_shortcuts',
id: 'navigation_shortcuts',
@@ -66,9 +64,8 @@ protected function blockAccess(AccountInterface $account): AccessResultInterface
@@ -66,9 +64,8 @@ protected function blockAccess(AccountInterface $account): AccessResultInterface
* {@inheritdoc}
* {@inheritdoc}
*/
*/
public function build(): array {
public function build(): array {
// This navigation block requires shortcut module. Once the plugin is moved
// This navigation shortcuts block requires navigation module.
// to the module, this should not be necessary.
if (!$this->moduleHandler->moduleExists('navigation')) {
if (!$this->moduleHandler->moduleExists('shortcut')) {
return [];
return [];
}
}
return [
return [
Loading