Commit abbe6b35 authored by David Suissa's avatar David Suissa
Browse files

Issue #3552172 by dydave: Trigger a menu link rebuild for user roles and views entity operations.

parent 62c44471
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ abstract class AdminToolbarSearchTestBase extends WebDriverTestBase {
  protected $userWithAccess;

  /**
   * A test user without the 'Use Admin Toolbar search' permission..
   * A test user without the 'Use Admin Toolbar search' permission.
   *
   * @var \Drupal\user\UserInterface
   */
+12 −1
Original line number Diff line number Diff line
@@ -163,9 +163,20 @@ class AdminToolbarToolsHelper {
   *
   * @return array<int, mixed>
   *   An array of entity machine names.
   *
   * @see admin_toolbar_tools_entity_insert()
   * @see admin_toolbar_tools_entity_update()
   * @see admin_toolbar_tools_entity_delete()
   */
  public function getRebuildEntityTypes() {
    $types = ['menu'];
    // The entity types that should trigger a menu rebuild when created,
    // updated or deleted. Add supported config entity types which will get
    // merged with bundleable entity types.
    $types = [
      'menu',
      'user_role',
      'view',
    ];
    $content_entities = $this->getBundleableEntitiesList();
    $types = array_merge($types, array_column($content_entities, 'content_entity_bundle'));
    return $types;