mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 19:18:44 +02:00
N°3592 - Migrate module to new UIBlock system : Customized request forms : allow null for value in function AddMetadata
This commit is contained in:
@@ -1,28 +1,15 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* Copyright (C) 2013-2021 Combodo SARL
|
* @copyright Copyright (C) 2010-2021 Combodo SARL
|
||||||
*
|
* @license http://opensource.org/licenses/AGPL-3.0
|
||||||
* This file is part of iTop.
|
|
||||||
*
|
|
||||||
* iTop is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* iTop is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Combodo\iTop\Form\Field;
|
namespace Combodo\iTop\Form\Field;
|
||||||
|
|
||||||
use Closure;
|
use Closure;
|
||||||
use Combodo\iTop\Form\Validator\Validator;
|
|
||||||
use Combodo\iTop\Form\Validator\MandatoryValidator;
|
use Combodo\iTop\Form\Validator\MandatoryValidator;
|
||||||
|
use Combodo\iTop\Form\Validator\Validator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Description of Field
|
* Description of Field
|
||||||
@@ -475,9 +462,10 @@ abstract class Field
|
|||||||
* @return $this;
|
* @return $this;
|
||||||
* @since 2.7.0
|
* @since 2.7.0
|
||||||
*/
|
*/
|
||||||
public function AddMetadata(string $sName, string $sValue)
|
public function AddMetadata(string $sName, ?string $sValue = null)
|
||||||
{
|
{
|
||||||
$this->aMetadata[$sName] = $sValue;
|
$this->aMetadata[$sName] = $sValue;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user