_menu_ui_node_save example

// Create an unpublished node. Revision count: 1.     $node = $this->createNode([
      'type' => 'bundle_with_section_field',
      'title' => 'The first node title',
      'body' => [
        [
          'value' => 'The first node body',
        ],
      ],
    ]);
    _menu_ui_node_save($node[
      'title' => 'bar',
      'menu_name' => 'main',
      'description' => 'view bar',
      'parent' => '',
    ]);

    $this->drupalGet($node->toUrl());
    // Publish the node. Revision count: 2.     $page->fillField('new_state', 'published');
    $page->pressButton('Apply');

    
Home | Imprint | This part of the site doesn't use cookies.