mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 02:58:43 +02:00
Prerequisites for custom fields
SVN:trunk[3913]
This commit is contained in:
@@ -60,6 +60,25 @@ class Form
|
||||
return $this->aDependencies;
|
||||
}
|
||||
|
||||
public function GetCurrentValues()
|
||||
{
|
||||
$aValues = array();
|
||||
foreach ($this->aFields as $sId => $oField)
|
||||
{
|
||||
$aValues[$sId] = $oField->GetCurrentValue();
|
||||
}
|
||||
return $aValues;
|
||||
}
|
||||
|
||||
public function SetCurrentValues($aValues)
|
||||
{
|
||||
foreach ($aValues as $sId => $value)
|
||||
{
|
||||
$oField = $this->GetField($sId);
|
||||
$oField->SetCurrentValue($value);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the current validation state of the form (true|false).
|
||||
* It DOESN'T make the validation, see Validate() instead.
|
||||
@@ -154,6 +173,7 @@ class Form
|
||||
|
||||
public function AddField(Field $oField, $aDependsOnIds = array())
|
||||
{
|
||||
$oField->SetFormPath($this->sId);
|
||||
$this->aFields[$oField->GetId()] = $oField;
|
||||
return $this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user