mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-20 00:58:48 +02:00
✅ Fix CI
This commit is contained in:
@@ -42,6 +42,7 @@ define('ITOP_DEFAULT_ENV', 'production');
|
||||
define('MAINTENANCE_MODE_FILE', APPROOT.'data/.maintenance');
|
||||
define('READONLY_MODE_FILE', APPROOT.'data/.readonly');
|
||||
|
||||
// TODO 3.3 To deprecate
|
||||
/**
|
||||
* Exclude the parent class from the list
|
||||
*
|
||||
|
||||
@@ -863,6 +863,7 @@ Nous espérons que vous aimerez cette version autant que nous avons eu du plaisi
|
||||
'UI:LinksWidget:Autocomplete+' => 'Tapez les 3 premiers caractères...',
|
||||
'UI:Edit:SearchQuery' => 'Sélectionner une requête prédéfinie',
|
||||
'UI:Edit:TestQuery' => 'Tester la requête',
|
||||
'UI:Edit:QueryBook' => 'Predefined query',
|
||||
'UI:Combo:SelectValue' => '--- choisissez une valeur ---',
|
||||
'UI:Label:SelectedObjects' => 'Objets sélectionnés: ',
|
||||
'UI:Label:AvailableObjects' => 'Objets disponibles: ',
|
||||
|
||||
@@ -9,6 +9,7 @@ namespace Combodo\iTop\PropertyType;
|
||||
|
||||
use Combodo\iTop\DesignElement;
|
||||
use Combodo\iTop\PropertyType\ValueType\AbstractValueType;
|
||||
use Combodo\iTop\PropertyType\ValueType\ValueTypeFactory;
|
||||
|
||||
/**
|
||||
* A property type is a definition of properties (organized in tree)
|
||||
@@ -35,12 +36,11 @@ class PropertyType
|
||||
|
||||
$oDefinitionNode = $oDomNode->GetUniqueElement('definition');
|
||||
$sDefinitionNodeType = $oDefinitionNode->getAttribute('xsi:type');
|
||||
|
||||
if (!is_a($sDefinitionNodeType, AbstractValueType::class, true)) {
|
||||
$this->oValueType = ValueTypeFactory::GetInstance()->CreateValueType($sDefinitionNodeType);
|
||||
if (is_null($this->oValueType)) {
|
||||
throw new PropertyTypeException('Unsupported xsi:type '.json_encode($sDefinitionNodeType), $oDomNode);
|
||||
}
|
||||
|
||||
$this->oValueType = new $sDefinitionNodeType();
|
||||
$this->oValueType->SetRootId($this->sId);
|
||||
$this->oValueType->InitFromDomNode($oDefinitionNode);
|
||||
}
|
||||
|
||||
@@ -32,6 +32,15 @@ class ValueTypeFactory
|
||||
return static::$oInstance;
|
||||
}
|
||||
|
||||
public function CreateValueType(string $sClass): ?AbstractValueType
|
||||
{
|
||||
if (!is_a($sClass, AbstractValueType::class, true)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return new $sClass();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \Combodo\iTop\DesignElement $oDomNode
|
||||
* @param \Combodo\iTop\PropertyType\ValueType\AbstractValueType|null $oParent
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
namespace Combodo\iTop\Test\UnitTest\Sources\Forms\Block;
|
||||
|
||||
use Combodo\iTop\Application\Dashboard\FormBlock\DashletPropertiesFormBlock;
|
||||
use Combodo\iTop\Forms\Block\AbstractTypeFormBlock;
|
||||
use Combodo\iTop\Forms\Block\Base\CheckboxFormBlock;
|
||||
use Combodo\iTop\Forms\Block\Base\FormBlock;
|
||||
@@ -14,7 +15,6 @@ use Combodo\iTop\Forms\Block\Base\TextFormBlock;
|
||||
use Combodo\iTop\Forms\Block\FormBlockException;
|
||||
use Combodo\iTop\Forms\Block\IFormBlock;
|
||||
use Combodo\iTop\Forms\Forms;
|
||||
use Combodo\iTop\ItopSdkFormDemonstrator\Form\Block\Dashboard\DashletPropertiesFormBlock;
|
||||
use Combodo\iTop\Service\InterfaceDiscovery\InterfaceDiscovery;
|
||||
use Combodo\iTop\Test\UnitTest\sources\Forms\AbstractFormsTest;
|
||||
use OutOfBoundsException;
|
||||
|
||||
Reference in New Issue
Block a user