mirror of
https://github.com/Combodo/iTop.git
synced 2026-03-03 08:04:17 +01:00
Merge branch 'support/3.0' into saas/3.0
This commit is contained in:
@@ -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;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user