protected function getFluidTemplateObject($filename)
    {
        $view = GeneralUtility::makeInstance(StandaloneView::class);
        $view->setLayoutRootPaths(['EXT:backend/Resources/Private/Layouts']);
        if (\Gilbertsoft\Warranty\Utility\Adapter::isCompatVersion('8.7')) {
            $view->setPartialRootPaths(['EXT:backend/Resources/Private/Partials/ToolbarItems']);
            $view->assignMultiple([
                    'iconSize'  => 'default',
                ]);
        } else {
            $view->setPartialRootPaths(['EXT:gswarranty/Resources/Private/Partials/ToolbarItems']);
            $view->assignMultiple([
                    'iconSize'  => 'small',
                ]);
        }
        $view->setTemplateRootPaths(['EXT:gswarranty/Resources/Private/Templates/ToolbarItems']);
        $view->setTemplate($filename);

        return $view;
    }