2

You can add them yourself in a custom module. [MODULE].links.menu.yml: [MODULE].views.list: deriver: 'Drupal\[MODULE]\Plugin\Derivative\ViewMenuLinks' [MODULE]/src/Plugin/Derivative/ViewMenuLinks.php: <?php namespace Drupal\[MODULE]\Plugin\Derivative; use Drupal\Component\Plugin\Derivative\DeriverBase; use Drupal\Core\Plugin\Discovery\...


1

You didn't take into account the default language. Your code will break if you're running this code on a callback in the default language, because you remove the default translation, and you're not allowed to do that: $defaultLanguage = \Drupal::languageManager->getDefaultLanguage()->getId(); if ($entity->hasTranslation($language->getId()) &&...


Only top voted, non community-wiki answers of a minimum length are eligible