test and corrections

This commit is contained in:
Benjamin Dalsass
2025-11-27 10:58:21 +01:00
parent d0a2af44ac
commit b8a093e625
22 changed files with 457 additions and 119 deletions

View File

@@ -0,0 +1,25 @@
<?php
/*
* @copyright Copyright (C) 2010-2025 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
*/
namespace Combodo\iTop\Forms\Block;
class FormBlockHelper
{
/**
* Returns a unique form ID for the given form block, based on its hierarchy.
*
* @param AbstractFormBlock $oForm
*
* @return string
*/
public static function GetFormId(AbstractFormBlock $oForm): string
{
if (is_null($oForm->getParent())) {
return $oForm->getName();
}
return self::GetFormId($oForm->getParent()).'_'.$oForm->getName();
}
}