mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 02:58:43 +02:00
N°8772 - dynamic form
This commit is contained in:
37
sources/Forms/IO/FormBinding.php
Normal file
37
sources/Forms/IO/FormBinding.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
/*
|
||||
* @copyright Copyright (C) 2010-2025 Combodo SARL
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
*/
|
||||
|
||||
namespace Combodo\iTop\Forms\IO;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class FormBinding
|
||||
{
|
||||
public readonly AbstractFormIO $oSourceIO;
|
||||
public readonly AbstractFormIO $oDestinationIO;
|
||||
|
||||
/**
|
||||
* @param AbstractFormIO $oSourceIO
|
||||
* @param AbstractFormIO $oDestinationIO
|
||||
*/
|
||||
public function __construct(AbstractFormIO $oSourceIO, AbstractFormIO $oDestinationIO)
|
||||
{
|
||||
$this->oDestinationIO = $oDestinationIO;
|
||||
$this->oSourceIO = $oSourceIO;
|
||||
}
|
||||
|
||||
/**
|
||||
* Propagate binding values.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function PropagateValues(): void
|
||||
{
|
||||
$this->oDestinationIO->SetValues($this->oSourceIO->GetValues());
|
||||
$this->oDestinationIO->GetOwnerBlock()->BindingReceivedEvent($this->oDestinationIO);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user