mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-29 21:48:45 +02:00
N°3526 - Clean up pass on UIBlockFactories
- Add PHPDoc - Remove (Object) return type hint on overloadable methods
This commit is contained in:
@@ -16,10 +16,13 @@ use Combodo\iTop\Application\UI\Base\AbstractUIBlockFactory;
|
||||
* @author Eric Espie <eric.espie@combodo.com>
|
||||
* @package Combodo\iTop\Application\UI\Base\Component\Input\FileSelect
|
||||
* @since 3.0.0
|
||||
* @api
|
||||
*/
|
||||
class FileSelectUIBlockFactory extends AbstractUIBlockFactory
|
||||
{
|
||||
/** @inheritDoc */
|
||||
public const TWIG_TAG_NAME = 'UIFileSelect';
|
||||
/** @inheritDoc */
|
||||
public const UI_BLOCK_CLASS_NAME = FileSelect::class;
|
||||
|
||||
/**
|
||||
@@ -28,7 +31,7 @@ class FileSelectUIBlockFactory extends AbstractUIBlockFactory
|
||||
*
|
||||
* @return \Combodo\iTop\Application\UI\Base\Component\Input\FileSelect\FileSelect A styled file input selector
|
||||
*/
|
||||
public static function MakeStandard(string $sName, string $sId = null): FileSelect
|
||||
public static function MakeStandard(string $sName, string $sId = null)
|
||||
{
|
||||
return new FileSelect($sName, $sId);
|
||||
}
|
||||
|
||||
@@ -21,10 +21,12 @@ use Combodo\iTop\Application\UI\Base\Component\Field\Field;
|
||||
*/
|
||||
class InputUIBlockFactory extends AbstractUIBlockFactory
|
||||
{
|
||||
/** @inheritDoc */
|
||||
public const TWIG_TAG_NAME = 'UIInput';
|
||||
/** @inheritDoc */
|
||||
public const UI_BLOCK_CLASS_NAME = Input::class;
|
||||
|
||||
public static function MakeForHidden(string $sName, string $sValue, ?string $sId = null): Input
|
||||
public static function MakeForHidden(string $sName, string $sValue, ?string $sId = null)
|
||||
{
|
||||
$oInput = new Input($sId);
|
||||
|
||||
@@ -35,7 +37,7 @@ class InputUIBlockFactory extends AbstractUIBlockFactory
|
||||
return $oInput;
|
||||
}
|
||||
|
||||
public static function MakeStandard(string $sType, string $sName, string $sValue, ?string $sId = null): Input
|
||||
public static function MakeStandard(string $sType, string $sName, string $sValue, ?string $sId = null)
|
||||
{
|
||||
$oInput = new Input($sId);
|
||||
|
||||
@@ -60,7 +62,7 @@ class InputUIBlockFactory extends AbstractUIBlockFactory
|
||||
public static function MakeForInputWithLabel(
|
||||
string $sLabel, string $sInputName, ?string $sInputValue = null,
|
||||
?string $sInputId = null, string $sInputType = 'type'
|
||||
): InputWithLabel
|
||||
)
|
||||
{
|
||||
$oInput = new Input($sInputId);
|
||||
$oInput->SetType($sInputType);
|
||||
|
||||
@@ -16,13 +16,16 @@ use Combodo\iTop\Application\UI\Base\AbstractUIBlockFactory;
|
||||
* @author Eric Espie <eric.espie@combodo.com>
|
||||
* @package Combodo\iTop\Application\UI\Base\Component\Input\Select
|
||||
* @since 3.0.0
|
||||
* @internal
|
||||
*/
|
||||
class SelectOptionUIBlockFactory extends AbstractUIBlockFactory
|
||||
{
|
||||
/** @inheritDoc */
|
||||
public const TWIG_TAG_NAME = 'UISelectOption';
|
||||
/** @inheritDoc */
|
||||
public const UI_BLOCK_CLASS_NAME = SelectOption::class;
|
||||
|
||||
public static function MakeForSelectOption(string $sValue, string $sLabel, bool $bSelected, ?string $sId = null): SelectOption
|
||||
public static function MakeForSelectOption(string $sValue, string $sLabel, bool $bSelected, ?string $sId = null)
|
||||
{
|
||||
$oInput = new SelectOption($sId);
|
||||
|
||||
|
||||
@@ -21,7 +21,9 @@ use Combodo\iTop\Application\UI\Base\Component\Input\Select\Select;
|
||||
*/
|
||||
class SelectUIBlockFactory extends AbstractUIBlockFactory
|
||||
{
|
||||
/** @inheritDoc */
|
||||
public const TWIG_TAG_NAME = 'UISelect';
|
||||
/** @inheritDoc */
|
||||
public const UI_BLOCK_CLASS_NAME = Select::class;
|
||||
|
||||
/**
|
||||
@@ -32,7 +34,7 @@ class SelectUIBlockFactory extends AbstractUIBlockFactory
|
||||
*
|
||||
* @return \Combodo\iTop\Application\UI\Base\Component\Input\Select\Select
|
||||
*/
|
||||
public static function MakeForSelect(string $sName, ?string $sId = null): Select
|
||||
public static function MakeForSelect(string $sName, ?string $sId = null)
|
||||
{
|
||||
$oInput = new Select($sId);
|
||||
$oInput->SetName($sName);
|
||||
@@ -51,7 +53,7 @@ class SelectUIBlockFactory extends AbstractUIBlockFactory
|
||||
*
|
||||
* @return \Combodo\iTop\Application\UI\Base\Component\Input\Select\Select
|
||||
*/
|
||||
public static function MakeForSelectWithLabel(string $sName, string $sLabel, ?string $sId = null): Select
|
||||
public static function MakeForSelectWithLabel(string $sName, string $sLabel, ?string $sId = null)
|
||||
{
|
||||
$oInput = new Select($sId);
|
||||
$oInput->SetName($sName);
|
||||
|
||||
Reference in New Issue
Block a user