N°5957 - Relations: Refactor \DisplayBlock to correctly handle 'listInObject' style

This commit is contained in:
Molkobain
2023-04-21 23:45:08 +02:00
parent 58b230cd74
commit f308d9b478
3 changed files with 74 additions and 46 deletions

View File

@@ -71,6 +71,10 @@ class DataTableUIBlockFactory extends AbstractUIBlockFactory
public static function MakeForResult(WebPage $oPage, string $sListId, DBObjectSet $oSet, $aExtraParams = array())
{
$oDataTable = DataTableUIBlockFactory::MakeForRendering($sListId, $oSet, $aExtraParams);
if ($oPage->IsPrintableVersion()) {
$oDataTable->AddOption('printVersion', true);
}
return self::RenderDataTable($oDataTable, 'list', $oPage, $sListId, $oSet, $aExtraParams);
}