mirror of
https://github.com/Combodo/iTop.git
synced 2026-03-06 09:34:13 +01:00
N°2847 - Datatables for static data
This commit is contained in:
@@ -10,7 +10,9 @@ use ApplicationException;
|
||||
use AttributeLinkedSet;
|
||||
use CMDBObjectSet;
|
||||
use cmdbAbstractObject;
|
||||
use Combodo\iTop\Application\UI\Component\DataTable\StaticTable\StaticTable;
|
||||
use Combodo\iTop\Application\UI\Component\Panel\PanelFactory;
|
||||
use Combodo\iTop\Application\UI\Component\Title\TitleFactory;
|
||||
use MetaModel;
|
||||
use appUserPreferences;
|
||||
use UserRights;
|
||||
@@ -639,7 +641,19 @@ class DataTableFactory
|
||||
} )'
|
||||
];
|
||||
|
||||
|
||||
return $aOptions;
|
||||
}
|
||||
|
||||
public static function MakeForStaticData(string $sTitle, array $aColumns, array $aData, ?string $sId = null)
|
||||
{
|
||||
$oBlock = new UIContentBlock();
|
||||
$oTitle = TitleFactory::MakeNeutral($sTitle, 3);
|
||||
$oBlock->AddSubBlock($oTitle);
|
||||
$oTable = new StaticTable($sId);
|
||||
$oTable->SetColumns($aColumns);
|
||||
$oTable->SetData($aData);
|
||||
$oBlock->AddSubBlock($oTable);
|
||||
|
||||
return $oBlock;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user