Merge branch 'support/3.0' into develop

# Conflicts:
#	application/applicationextension.inc.php
This commit is contained in:
Eric Espie
2022-12-29 14:40:26 +01:00
25 changed files with 321 additions and 64 deletions

View File

@@ -15,9 +15,9 @@ use Combodo\iTop\Application\UI\Base\Component\Field\Field;
* Class InputUIBlockFactory
*
* @author Eric Espie <eric.espie@combodo.com>
* @package Combodo\iTop\Application\UI\Base\Component\Input
* @package UIBlockExtensibilityAPI
* @api
* @since 3.0.0
* @internal
*/
class InputUIBlockFactory extends AbstractUIBlockFactory
{
@@ -26,6 +26,14 @@ class InputUIBlockFactory extends AbstractUIBlockFactory
/** @inheritDoc */
public const UI_BLOCK_CLASS_NAME = Input::class;
/**
* @api
* @param string $sName
* @param string $sValue
* @param string|null $sId
*
* @return \Combodo\iTop\Application\UI\Base\Component\Input\Input
*/
public static function MakeForHidden(string $sName, string $sValue, ?string $sId = null)
{
$oInput = new Input($sId);
@@ -37,6 +45,15 @@ class InputUIBlockFactory extends AbstractUIBlockFactory
return $oInput;
}
/**
* @api
* @param string $sType
* @param string $sName
* @param string $sValue
* @param string|null $sId
*
* @return \Combodo\iTop\Application\UI\Base\Component\Input\Input
*/
public static function MakeStandard(string $sType, string $sName, string $sValue, ?string $sId = null)
{
$oInput = new Input($sId);
@@ -49,6 +66,7 @@ class InputUIBlockFactory extends AbstractUIBlockFactory
}
/**
* @api
* @see Field component that is better adapter when dealing with a standard iTop form
*
* @param string $sLabel
@@ -71,6 +89,15 @@ class InputUIBlockFactory extends AbstractUIBlockFactory
return static::MakeInputWithLabel($sInputName, $sLabel, $oInput, $sInputId);
}
/**
* @api
* @param string $sName
* @param string $sLabel
* @param \Combodo\iTop\Application\UI\Base\Component\Input\Input $oInput
* @param string|null $sId
*
* @return \Combodo\iTop\Application\UI\Base\Component\Input\InputWithLabel
*/
private static function MakeInputWithLabel(string $sName, string $sLabel, Input $oInput, ?string $sId = null)
{
$oInput->SetName($sName);