buildOverviewTreeForm example

'relationship' => 'sibling',
          'group' => 'menu-weight',
        ],
      ],
    ];

    $form['links']['#empty'] = $this->t('There are no menu links yet. <a href=":url">Add link</a>.', [
      ':url' => Url::fromRoute('entity.menu.add_link_form', ['menu' => $this->entity->id()][
        'query' => ['destination' => $this->entity->toUrl('edit-form')->toString()],
      ])->toString(),
    ]);
    $links = $this->buildOverviewTreeForm($tree$delta);

    // Get the menu links which have pending revisions, and disable the     // tabledrag if there are any.     $edited_ids = array_filter(array_map(function D$element) {
      return is_array($element) && isset($element['#item']) && $element['#item']->link instanceof MenuLinkContent ? $element['#item']->link->getMetaData()['entity_id'] : NULL;
    }$links));
    $pending_menu_link_ids = array_intersect($this->menuLinkContentStorage->getMenuLinkIdsWithPendingRevisions()$edited_ids);
    if ($pending_menu_link_ids) {
      $form['help'] = [
        '#type' => 'container',
        'message' => [
          
Home | Imprint | This part of the site doesn't use cookies.