mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-19 08:38:45 +02:00
N°8772 - Form dependencies manager implementation
- Form SDK implementation - Basic Forms - Dynamics Forms - Basic Blocks + Data Model Block - Form Compilation - Turbo integration
This commit is contained in:
38
sources/Forms/Block/Base/IntegerFormBlock.php
Normal file
38
sources/Forms/Block/Base/IntegerFormBlock.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* @copyright Copyright (C) 2010-2025 Combodo SAS
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
*/
|
||||
|
||||
namespace Combodo\iTop\Forms\Block\Base;
|
||||
|
||||
use Combodo\iTop\Forms\Block\AbstractTypeFormBlock;
|
||||
use Combodo\iTop\Forms\IO\Format\IntegerIOFormat;
|
||||
use Combodo\iTop\Forms\IO\Format\NumberIOFormat;
|
||||
use Combodo\iTop\Forms\Register\IORegister;
|
||||
use Symfony\Component\Form\Extension\Core\Type\IntegerType;
|
||||
|
||||
/**
|
||||
* A block to manage an integer
|
||||
* This block exposes a single output: the integer value.
|
||||
*
|
||||
* @package Combodo\iTop\Forms\Block\Base
|
||||
* @since 3.3.0
|
||||
*/
|
||||
class IntegerFormBlock extends AbstractTypeFormBlock
|
||||
{
|
||||
public const OUTPUT_INTEGER = 'integer';
|
||||
|
||||
public function GetFormType(): string
|
||||
{
|
||||
return IntegerType::class;
|
||||
}
|
||||
|
||||
/** @inheritdoc */
|
||||
protected function RegisterIO(IORegister $oIORegister): void
|
||||
{
|
||||
parent::RegisterIO($oIORegister);
|
||||
$oIORegister->AddOutput(self::OUTPUT_INTEGER, IntegerIOFormat::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user