diff --git a/sources/application/UI/Component/Field/Field.php b/sources/application/UI/Component/Field/Field.php index ad109df02..902e47795 100644 --- a/sources/application/UI/Component/Field/Field.php +++ b/sources/application/UI/Component/Field/Field.php @@ -13,14 +13,19 @@ use Combodo\iTop\Application\UI\UIBlock; * Class Field * * @package Combodo\iTop\Application\UI\Component\Field + * @author Eric Espie + * @author Anne-Catherine Cognet + * @since 3.0.0 */ class Field extends UIBlock { // Overloaded constants + /** @inheritdoc */ public const BLOCK_CODE = 'ibo-field'; + /** @inheritdoc */ public const HTML_TEMPLATE_REL_PATH = 'components/field/layout'; - /** @var array */ + /** @var array Array of various parameters of the field. This should be exploded in dedicated properties instead of a grey array. */ protected $aParams; public function __construct(array $aParams, ?string $sId = null) @@ -31,6 +36,7 @@ class Field extends UIBlock /** * @return array + * @internal */ public function GetParams(): array { diff --git a/templates/components/field/layout.html.twig b/templates/components/field/layout.html.twig index be2f50386..e55097fbc 100644 --- a/templates/components/field/layout.html.twig +++ b/templates/components/field/layout.html.twig @@ -1,5 +1,19 @@ {% set aParams = oUIBlock.GetParams() %} -
+
{{ aParams.label|raw }}
{{ aParams.value|raw }}
\ No newline at end of file