- 🇮🇳India sadashiv
I was trying to do something similar, I ended up,
1) Create a quicktabs using UI
2) In code $qt = \Drupal\quicktabs\Entity\QuickTabsInstance::load('QT_ID');
3)$configuration_data = [ [ 'title'=> 'Node 1', 'weight'=> 0, 'type' => 'node_content', 'content' => [ 'node_content' => [ 'options' => [ 'nid' => '1', 'view_mode' => 'full', 'hide_title' => true, ], ], ], ], [ 'title'=> 'Node', 2 'weight'=> 1, 'type' => 'node_content', 'content' => [ 'node_content' => [ 'options' => [ 'nid' => '2', 'view_mode' => 'full', 'hide_title' => true, ], ], ], ], ];
Simple try is to configure the qt using UI and check the export and form this configuration array
4) $qt->setConfigurationData($configuration_data);
5) $qt->getRenderArray() returns the rederer array which can then be returned or passed through drupal renderer.Thanks,
Sadashiv.