mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-22 10:08:45 +02:00
N°9065 - XML Definition for Dashlet properties
This commit is contained in:
@@ -9,6 +9,9 @@ namespace Combodo\iTop\Forms\IO;
|
||||
|
||||
use Combodo\iTop\Forms\Block\AbstractFormBlock;
|
||||
use Combodo\iTop\Forms\IO\Format\AbstractIOFormat;
|
||||
use Combodo\iTop\Forms\IO\Format\AttributeIOFormat;
|
||||
use Combodo\iTop\Forms\IO\Format\ClassIOFormat;
|
||||
use Combodo\iTop\Forms\IO\Format\StringIOFormat;
|
||||
use Symfony\Component\Form\FormEvents;
|
||||
|
||||
/**
|
||||
@@ -312,4 +315,26 @@ class AbstractFormIO
|
||||
return $this->aBindingsToInputs;
|
||||
}
|
||||
|
||||
/**
|
||||
* Compatibility rules
|
||||
*
|
||||
* @param \Combodo\iTop\Forms\IO\AbstractFormIO $oFormIO
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function IsCompatibleWith(AbstractFormIO $oFormIO): bool
|
||||
{
|
||||
if ($this->GetDataType() === StringIOFormat::class) {
|
||||
switch ($oFormIO->GetDataType()) {
|
||||
case StringIOFormat::class:
|
||||
case AttributeIOFormat::class:
|
||||
case ClassIOFormat::class:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return ($oFormIO->GetDataType() === $this->GetDataType());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user