N°8772 - WIP dependencies - Does not work yet

This commit is contained in:
Eric Espie
2025-11-04 09:05:29 +01:00
parent 0909ddfb3a
commit 5a1f6ffde9
7 changed files with 60 additions and 24 deletions

View File

@@ -13,8 +13,6 @@ use Combodo\iTop\Forms\Block\IO\Format\RawFormat;
use Combodo\iTop\Forms\Block\IO\FormInput;
use Combodo\iTop\Forms\Block\IO\FormOutput;
use Combodo\iTop\Forms\IFormBlock;
use IssueLog;
use Symfony\Component\Filesystem\Exception\IOException;
/**
* Abstract form block.
@@ -104,9 +102,9 @@ abstract class AbstractFormBlock implements IFormBlock
/**
* Get the parent block.
*
* @return FormBlock
* @return FormBlock|null
*/
public function GetParent(): FormBlock
public function GetParent(): ?FormBlock
{
return $this->oParent;
}
@@ -121,6 +119,15 @@ abstract class AbstractFormBlock implements IFormBlock
return $this->sName;
}
public function GetIdentifier(): string
{
$sParentName = $this->GetParent()?->GetIdentifier();
if (is_null($sParentName)) {
return $this->GetName();
}
return $sParentName.'_'.$this->sName;
}
/**
* Return the form block options.
* Options will be passed to FormType for building.