Add partial turbo event

This commit is contained in:
Benjamin DALSASS
2026-01-20 14:39:40 +01:00
parent 096dfd7dec
commit c85e0373b1
5 changed files with 25 additions and 7 deletions

View File

@@ -88,6 +88,21 @@ abstract class AbstractFormBlock implements IFormBlock
return $this->oParent;
}
/**
* Get the root form.
*
* @return FormBlock|CollectionBlock|null
*/
public function GetRoot(): FormBlock|CollectionBlock|null
{
$oBlock = $this;
while (!$oBlock->IsRootBlock()) {
$oBlock = $oBlock->GetParent();
}
return $oBlock;
}
/**
* Return true if this block is root.
*