Merge branch 'support/3.0' into saas/3.0

This commit is contained in:
odain
2023-05-22 14:08:02 +02:00
609 changed files with 10493 additions and 7385 deletions

View File

@@ -16,9 +16,10 @@ use Combodo\iTop\Application\UI\Base\UIBlock;
*
* Use it to make a "field" which is composed of a label and a value (which can be read-only or editable)
*
* @api
* @package UIBlockExtensibilityAPI
* @author Pierre Goiffon <pierre.goiffon@combodo.com>
* @since 3.0.0
* @internal
*/
class FieldUIBlockFactory extends AbstractUIBlockFactory
{
@@ -27,6 +28,12 @@ class FieldUIBlockFactory extends AbstractUIBlockFactory
/** @inheritDoc */
public const UI_BLOCK_CLASS_NAME = Field::class;
/**
* @api
* @param $aParams
*
* @return \Combodo\iTop\Application\UI\Base\Component\Field\Field
*/
public static function MakeFromParams($aParams)
{
$oValue = new Html($aParams['value']);
@@ -75,6 +82,14 @@ class FieldUIBlockFactory extends AbstractUIBlockFactory
$oField->$sMethodName((($iParamsFlags & $iConstant) === $iConstant));
}
/**
* @api
* @param string $sLabel
* @param \Combodo\iTop\Application\UI\Base\UIBlock $oInput
* @param string|null $sLayout
*
* @return \Combodo\iTop\Application\UI\Base\Component\Field\Field
*/
public static function MakeFromObject(string $sLabel, UIBlock $oInput, ?string $sLayout = null)
{
$oField = new Field($sLabel, $oInput);
@@ -135,4 +150,4 @@ class FieldUIBlockFactory extends AbstractUIBlockFactory
return $oField;
}
}
}