Enhance Service locator

This commit is contained in:
Eric Espie
2026-01-27 11:54:05 +01:00
parent 390b5c0bc3
commit bfa7a209d6
43 changed files with 338 additions and 210 deletions

View File

@@ -109,6 +109,8 @@ abstract class DashboardLayoutMultiCol extends DashboardLayout
*/
public function Render($oPage, $aCells, $bEditMode = false, $aExtraParams = [])
{
/** @var DashletService $oDashletService */
$oDashletService = MetaModel::GetService('DashletService');
// Trim the list of cells to remove the invisible/empty ones at the end of the array
$aCells = $this->TrimCellsArray($aCells);
@@ -147,7 +149,7 @@ abstract class DashboardLayoutMultiCol extends DashboardLayout
$sDashletId = $oDashlet->GetID();
$sDashletClass = $oDashlet->GetDashletType();
$aDashletDenormalizedProperties = $oDashlet->GetModelData();
$aDashletsInfo = DashletService::GetInstance()->GetDashletDefinition($sDashletClass);
$aDashletsInfo = $oDashletService->GetDashletDefinition($sDashletClass);
// GRID LAYOUT: Set position relative to grid
$iPositionX = $iGridCurrentX + $iGridCurrentColX;