I want to open PDF document in new TAB while pressing button "Download PDF".
Found a solution on SO that you have to add 'target' => "_blank", but in my case it's not working and I don't have an idea why. Tried setLinkAttribute, setChildAttribute, setAttribute and none of these are working. Also, content disposition inline already added.
$menu
->addChild(
'download_file',
[
'route' => 'admin_download_file',
'routeParameters' => [
'token' => $admin->getToken(),
],
]
)
->setAttribute('type', 'link')
->setLinkAttribute('target', '_blank');
or I think on child level something like: