Files
iTop/sources/Forms/IO/FormBinding.php
2025-11-14 10:50:57 +01:00

37 lines
805 B
PHP

<?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);
}
}