mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 02:58:43 +02:00
✅ N°8772 - AbstractFormIO and FormBinding tests
This commit is contained in:
@@ -87,18 +87,32 @@ class FormOutput extends AbstractFormIO
|
||||
* @param FormOutput $oDestinationIO
|
||||
*
|
||||
* @return FormBinding
|
||||
* @throws \Combodo\iTop\Forms\IO\FormBlockIOException
|
||||
*/
|
||||
public function BindToOutput(FormOutput $oDestinationIO): FormBinding
|
||||
{
|
||||
$oBinding = new FormBinding($this, $oDestinationIO);
|
||||
|
||||
$this->aBindingsToOutputs[] = $oBinding;
|
||||
|
||||
$oDestinationIO->Attach($oBinding);
|
||||
|
||||
return $oBinding;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function GetBindingsToOutputs(): array
|
||||
{
|
||||
return $this->aBindingsToOutputs;
|
||||
}
|
||||
|
||||
public function HasBindingOut(): bool
|
||||
{
|
||||
if (parent::HasBindingOut()) {
|
||||
return true; // has bindings to inputs
|
||||
}
|
||||
|
||||
return count($this->aBindingsToOutputs) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the bindings.
|
||||
|
||||
Reference in New Issue
Block a user