mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 15:34:12 +01:00
- Form SDK implementation - Basic Forms - Dynamics Forms - Basic Blocks + Data Model Block - Form Compilation - Turbo integration
65 lines
1.0 KiB
PHP
65 lines
1.0 KiB
PHP
<?php
|
|
|
|
/*
|
|
* @copyright Copyright (C) 2010-2025 Combodo SAS
|
|
* @license http://opensource.org/licenses/AGPL-3.0
|
|
*/
|
|
|
|
namespace Combodo\iTop\Forms\IO;
|
|
|
|
/**
|
|
* Form input IO.
|
|
*
|
|
* @package Combodo\iTop\Forms\IO
|
|
* @since 3.3.0
|
|
*/
|
|
class FormInput extends AbstractFormIO
|
|
{
|
|
/**
|
|
* @return bool
|
|
*/
|
|
public function IsDataReady(): bool
|
|
{
|
|
return $this->HasValue();
|
|
}
|
|
|
|
/**
|
|
* @param string|null $sEventType
|
|
*
|
|
* @return bool
|
|
*/
|
|
public function IsEventDataReady(string $sEventType = null): bool
|
|
{
|
|
return $this->HasEventValue($sEventType);
|
|
}
|
|
|
|
/**
|
|
* Set the values of the input.
|
|
*
|
|
* @param array $aValues
|
|
*
|
|
* @return AbstractFormIO
|
|
*/
|
|
public function SetValues(array $aValues): AbstractFormIO
|
|
{
|
|
parent::SetValues($aValues);
|
|
|
|
$this->PropagateBindingsValues();
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Propagate the bindings values.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function PropagateBindingsValues(): void
|
|
{
|
|
// propagate the value
|
|
foreach ($this->aBindingsToInputs as $oBinding) {
|
|
$oBinding->PropagateValues();
|
|
}
|
|
}
|
|
}
|