mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-30 22:18:46 +02:00
N°3526 - Clean up pass on UIBlocks
- Move UIBlock::ENUM_BLOCK_FILES_TYPE_XXX to iUIBlock - Add PHPDoc - Remove Object return type hint on overloadable methods - Add scalar return type hint - Add type hint on parameters
This commit is contained in:
@@ -123,11 +123,11 @@ class Alert extends UIContentBlock
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $sSectionStateStorageKey
|
||||
* @param string $sSectionStateStorageKey
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function EnableSaveCollapsibleState($sSectionStateStorageKey)
|
||||
public function EnableSaveCollapsibleState(string $sSectionStateStorageKey)
|
||||
{
|
||||
$this->bIsSaveCollapsibleStateEnabled = true;
|
||||
$this->sSectionStateStorageKey = 'UI-Collapsible__'.$sSectionStateStorageKey;
|
||||
@@ -138,7 +138,7 @@ class Alert extends UIContentBlock
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function GetTitle()
|
||||
public function GetTitle(): string
|
||||
{
|
||||
return $this->sTitle;
|
||||
}
|
||||
@@ -160,7 +160,7 @@ class Alert extends UIContentBlock
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function GetContent()
|
||||
public function GetContent(): string
|
||||
{
|
||||
return $this->sContent;
|
||||
}
|
||||
@@ -274,11 +274,19 @@ class Alert extends UIContentBlock
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
* @see static::$bIsSaveCollapsibleStateEnabled
|
||||
*/
|
||||
public function IsSaveCollapsibleStateEnabled(): bool
|
||||
{
|
||||
return $this->bIsSaveCollapsibleStateEnabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
* @see static::$sSectionStateStorageKey
|
||||
*/
|
||||
public function GetSessionCollapsibleStateStorageKey(): string
|
||||
{
|
||||
return $this->sSectionStateStorageKey;
|
||||
|
||||
@@ -74,7 +74,7 @@ class Breadcrumbs extends UIBlock
|
||||
/**
|
||||
* @return array|null
|
||||
*/
|
||||
public function GetNewEntry()
|
||||
public function GetNewEntry(): ?array
|
||||
{
|
||||
return $this->aNewEntry;
|
||||
}
|
||||
@@ -85,7 +85,7 @@ class Breadcrumbs extends UIBlock
|
||||
* @throws \CoreException
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function GetJsWidgetOptions()
|
||||
public function GetJsWidgetOptions(): array
|
||||
{
|
||||
$aJsWidgetOptions = [];
|
||||
|
||||
|
||||
@@ -110,7 +110,7 @@ class Button extends UIBlock
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function GetLabel()
|
||||
public function GetLabel(): string
|
||||
{
|
||||
return $this->sLabel;
|
||||
}
|
||||
@@ -129,7 +129,7 @@ class Button extends UIBlock
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function GetTooltip()
|
||||
public function GetTooltip(): string
|
||||
{
|
||||
return $this->sTooltip;
|
||||
}
|
||||
@@ -148,7 +148,7 @@ class Button extends UIBlock
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function GetIconClass()
|
||||
public function GetIconClass(): string
|
||||
{
|
||||
return $this->sIconClass;
|
||||
}
|
||||
@@ -167,7 +167,7 @@ class Button extends UIBlock
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function GetActionType()
|
||||
public function GetActionType(): string
|
||||
{
|
||||
return $this->sActionType;
|
||||
}
|
||||
@@ -187,7 +187,7 @@ class Button extends UIBlock
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function GetColor()
|
||||
public function GetColor(): string
|
||||
{
|
||||
return $this->sColor;
|
||||
}
|
||||
@@ -206,7 +206,7 @@ class Button extends UIBlock
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function GetOnClickJsCode()
|
||||
public function GetOnClickJsCode(): string
|
||||
{
|
||||
return $this->sOnClickJsCode;
|
||||
}
|
||||
@@ -226,7 +226,7 @@ class Button extends UIBlock
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function GetJsCode()
|
||||
public function GetJsCode(): string
|
||||
{
|
||||
return $this->sJsCode;
|
||||
}
|
||||
@@ -246,7 +246,7 @@ class Button extends UIBlock
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function IsDisabled()
|
||||
public function IsDisabled(): bool
|
||||
{
|
||||
return $this->bIsDisabled;
|
||||
}
|
||||
|
||||
@@ -42,11 +42,11 @@ class ButtonJS extends Button
|
||||
/** @var string DEFAULT_TYPE */
|
||||
public const DEFAULT_TYPE = self::ENUM_TYPE_BUTTON;
|
||||
|
||||
/** @var string $sType The HTML type of the button (eg. 'submit', 'button', ...) */
|
||||
/** @var string The HTML type of the button (eg. 'submit', 'button', ...) */
|
||||
protected $sType;
|
||||
/** @var string $sName The HTML name of the button, used by forms */
|
||||
/** @var string The HTML name of the button, used by forms */
|
||||
protected $sName;
|
||||
/** @var string $sValue The HTML value of the button, used by forms */
|
||||
/** @var string The HTML value of the button, used by forms */
|
||||
protected $sValue;
|
||||
|
||||
/**
|
||||
@@ -81,7 +81,7 @@ class ButtonJS extends Button
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function GetType()
|
||||
public function GetType(): string
|
||||
{
|
||||
return $this->sType;
|
||||
}
|
||||
@@ -100,7 +100,7 @@ class ButtonJS extends Button
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function GetName()
|
||||
public function GetName(): string
|
||||
{
|
||||
return $this->sName;
|
||||
}
|
||||
@@ -119,7 +119,7 @@ class ButtonJS extends Button
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function GetValue()
|
||||
public function GetValue(): string
|
||||
{
|
||||
return $this->sValue;
|
||||
}
|
||||
|
||||
@@ -45,9 +45,9 @@ class ButtonURL extends Button
|
||||
public const DEFAULT_TARGET = self::ENUM_TARGET_SELF;
|
||||
|
||||
|
||||
/** @var string $sURL */
|
||||
/** @var string */
|
||||
protected $sURL;
|
||||
/** @var string $sTarget */
|
||||
/** @var string */
|
||||
protected $sTarget;
|
||||
|
||||
/**
|
||||
|
||||
@@ -71,7 +71,7 @@ class ButtonGroup extends UIBlock
|
||||
* @return \Combodo\iTop\Application\UI\Base\Component\Button\Button[]
|
||||
* @use static::$aButtons
|
||||
*/
|
||||
public function GetButtons()
|
||||
public function GetButtons(): array
|
||||
{
|
||||
return $this->aButtons;
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ class CollapsibleSection extends UIContentBlock
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function IsOpenedByDefault()
|
||||
public function IsOpenedByDefault(): bool
|
||||
{
|
||||
return $this->bIsOpenedByDefault;
|
||||
}
|
||||
@@ -85,7 +85,7 @@ class CollapsibleSection extends UIContentBlock
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function GetTitle()
|
||||
public function GetTitle(): string
|
||||
{
|
||||
return $this->sTitle;
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ class DashletBadge extends DashletContainer
|
||||
*
|
||||
* @return DashletBadge
|
||||
*/
|
||||
public function SetCreateActionUrl(?string $sCreateActionUrl): DashletBadge
|
||||
public function SetCreateActionUrl(?string $sCreateActionUrl)
|
||||
{
|
||||
$this->sCreateActionUrl = $sCreateActionUrl;
|
||||
|
||||
@@ -98,7 +98,7 @@ class DashletBadge extends DashletContainer
|
||||
*
|
||||
* @return DashletBadge
|
||||
*/
|
||||
public function SetCreateActionLabel(?string $sCreateActionLabel): DashletBadge
|
||||
public function SetCreateActionLabel(?string $sCreateActionLabel)
|
||||
{
|
||||
$this->sCreateActionLabel = $sCreateActionLabel;
|
||||
|
||||
@@ -118,7 +118,7 @@ class DashletBadge extends DashletContainer
|
||||
*
|
||||
* @return DashletBadge
|
||||
*/
|
||||
public function SetClassIconUrl(string $sClassIconUrl): DashletBadge
|
||||
public function SetClassIconUrl(string $sClassIconUrl)
|
||||
{
|
||||
$this->sClassIconUrl = $sClassIconUrl;
|
||||
|
||||
@@ -138,7 +138,7 @@ class DashletBadge extends DashletContainer
|
||||
*
|
||||
* @return DashletBadge
|
||||
*/
|
||||
public function SetHyperlink(string $sHyperlink): DashletBadge
|
||||
public function SetHyperlink(string $sHyperlink)
|
||||
{
|
||||
$this->sHyperlink = $sHyperlink;
|
||||
|
||||
@@ -158,7 +158,7 @@ class DashletBadge extends DashletContainer
|
||||
*
|
||||
* @return DashletBadge
|
||||
*/
|
||||
public function SetCount(string $iCount): DashletBadge
|
||||
public function SetCount(string $iCount)
|
||||
{
|
||||
$this->iCount = $iCount;
|
||||
|
||||
@@ -178,7 +178,7 @@ class DashletBadge extends DashletContainer
|
||||
*
|
||||
* @return DashletBadge
|
||||
*/
|
||||
public function SetClassLabel(string $sClassLabel): DashletBadge
|
||||
public function SetClassLabel(string $sClassLabel)
|
||||
{
|
||||
$this->sClassLabel = $sClassLabel;
|
||||
|
||||
|
||||
@@ -76,8 +76,10 @@ class DataTable extends UIContentBlock
|
||||
|
||||
/**
|
||||
* @param mixed $sAjaxUrl
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function SetAjaxUrl(string $sAjaxUrl): void
|
||||
public function SetAjaxUrl(string $sAjaxUrl)
|
||||
{
|
||||
if (strlen($sAjaxUrl) > 0)
|
||||
{
|
||||
@@ -92,6 +94,8 @@ class DataTable extends UIContentBlock
|
||||
{
|
||||
$this->sAjaxUrl = $sAjaxUrl;
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -25,7 +25,7 @@ class DataTableConfig extends UIContentBlock
|
||||
/**
|
||||
* @return \Combodo\iTop\Application\UI\Base\Component\DataTable\DataTable
|
||||
*/
|
||||
private function GetDataTable(): DataTable
|
||||
private function GetDataTable()
|
||||
{
|
||||
return $this->oDataTable;
|
||||
}
|
||||
|
||||
@@ -49,9 +49,11 @@ class FormTable extends StaticTable
|
||||
/**
|
||||
* @param string $sRef
|
||||
*/
|
||||
public function SetRef(string $sRef): void
|
||||
public function SetRef(string $sRef)
|
||||
{
|
||||
$this->sRef = $sRef;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function GetRows(): array
|
||||
@@ -59,7 +61,7 @@ class FormTable extends StaticTable
|
||||
return $this->aRows;
|
||||
}
|
||||
|
||||
public function AddRow(FormTableRow $oRow): self
|
||||
public function AddRow(FormTableRow $oRow)
|
||||
{
|
||||
$this->aRows[] = $oRow;
|
||||
return $this;
|
||||
|
||||
@@ -67,10 +67,14 @@ class FormTableRow extends UIBlock
|
||||
|
||||
/**
|
||||
* @param string $sRef
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function SetRef(string $sRef): void
|
||||
public function SetRef(string $sRef)
|
||||
{
|
||||
$this->sRef = $sRef;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -83,10 +87,14 @@ class FormTableRow extends UIBlock
|
||||
|
||||
/**
|
||||
* @param array $aColumns
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function SetColumns(array $aColumns): void
|
||||
public function SetColumns(array $aColumns)
|
||||
{
|
||||
$this->aColumns = $aColumns;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -99,10 +107,14 @@ class FormTableRow extends UIBlock
|
||||
|
||||
/**
|
||||
* @param array $aData
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function SetData(array $aData): void
|
||||
public function SetData(array $aData)
|
||||
{
|
||||
$this->aData = $aData;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -115,9 +127,13 @@ class FormTableRow extends UIBlock
|
||||
|
||||
/**
|
||||
* @param int $iRowId
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function SetRowId(int $iRowId): void
|
||||
public function SetRowId(int $iRowId)
|
||||
{
|
||||
$this->iRowId = $iRowId;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
@@ -82,10 +82,14 @@ class StaticTable extends UIContentBlock
|
||||
|
||||
/**
|
||||
* @param array $aColumns
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function SetColumns(array $aColumns): void
|
||||
public function SetColumns(array $aColumns)
|
||||
{
|
||||
$this->aColumns = $aColumns;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -98,18 +102,26 @@ class StaticTable extends UIContentBlock
|
||||
|
||||
/**
|
||||
* @param array $aData
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function SetData(array $aData): void
|
||||
public function SetData(array $aData)
|
||||
{
|
||||
$this->aData = $aData;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sFilter
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function SetFilter($sFilter): void
|
||||
public function SetFilter($sFilter)
|
||||
{
|
||||
$this->sFilter = $sFilter;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function GetJSRefresh(): string
|
||||
|
||||
@@ -72,7 +72,7 @@ class Field extends UIContentBlock
|
||||
/**
|
||||
* @param string $sLayout
|
||||
*
|
||||
* @return Field
|
||||
* @return $this
|
||||
*/
|
||||
public function SetLayout(string $sLayout)
|
||||
{
|
||||
@@ -92,9 +92,9 @@ class Field extends UIContentBlock
|
||||
/**
|
||||
* @param string $sAttCode
|
||||
*
|
||||
* @return Field
|
||||
* @return $this
|
||||
*/
|
||||
public function SetAttCode(string $sAttCode): Field
|
||||
public function SetAttCode(string $sAttCode)
|
||||
{
|
||||
$this->sAttCode = $sAttCode;
|
||||
|
||||
@@ -112,9 +112,9 @@ class Field extends UIContentBlock
|
||||
/**
|
||||
* @param string $sAttType
|
||||
*
|
||||
* @return Field
|
||||
* @return $this
|
||||
*/
|
||||
public function SetAttType(string $sAttType): Field
|
||||
public function SetAttType(string $sAttType)
|
||||
{
|
||||
$this->sAttType = $sAttType;
|
||||
|
||||
@@ -132,9 +132,9 @@ class Field extends UIContentBlock
|
||||
/**
|
||||
* @param string $sAttLabel
|
||||
*
|
||||
* @return Field
|
||||
* @return $this
|
||||
*/
|
||||
public function SetAttLabel(string $sAttLabel): Field
|
||||
public function SetAttLabel(string $sAttLabel)
|
||||
{
|
||||
$this->sAttLabel = $sAttLabel;
|
||||
|
||||
@@ -152,7 +152,7 @@ class Field extends UIContentBlock
|
||||
/**
|
||||
* @param bool $bIsReadOnly
|
||||
*
|
||||
* @return Field
|
||||
* @return $this
|
||||
*/
|
||||
public function SetIsReadOnly(bool $bIsReadOnly)
|
||||
{
|
||||
@@ -172,7 +172,7 @@ class Field extends UIContentBlock
|
||||
/**
|
||||
* @param bool $bIsMandatory
|
||||
*
|
||||
* @return Field
|
||||
* @return $this
|
||||
*/
|
||||
public function SetIsMandatory(bool $bIsMandatory)
|
||||
{
|
||||
@@ -192,7 +192,7 @@ class Field extends UIContentBlock
|
||||
/**
|
||||
* @param bool $bIsMustChange
|
||||
*
|
||||
* @return Field
|
||||
* @return $this
|
||||
*/
|
||||
public function SetMustChange(bool $bIsMustChange)
|
||||
{
|
||||
@@ -212,7 +212,7 @@ class Field extends UIContentBlock
|
||||
/**
|
||||
* @param bool $bIsMustPrompt
|
||||
*
|
||||
* @return Field
|
||||
* @return $this
|
||||
*/
|
||||
public function SetMustPrompt(bool $bIsMustPrompt)
|
||||
{
|
||||
@@ -232,7 +232,7 @@ class Field extends UIContentBlock
|
||||
/**
|
||||
* @param bool $bIsSlave
|
||||
*
|
||||
* @return Field
|
||||
* @return $this
|
||||
*/
|
||||
public function SetIsSlave(bool $bIsSlave)
|
||||
{
|
||||
@@ -252,7 +252,7 @@ class Field extends UIContentBlock
|
||||
/**
|
||||
* @param string $sValueRaw
|
||||
*
|
||||
* @return Field
|
||||
* @return $this
|
||||
*/
|
||||
public function SetValueRaw(string $sValueRaw)
|
||||
{
|
||||
@@ -272,7 +272,7 @@ class Field extends UIContentBlock
|
||||
/**
|
||||
* @param string $sLabel
|
||||
*
|
||||
* @return Field
|
||||
* @return $this
|
||||
*/
|
||||
public function SetLabel(string $sLabel)
|
||||
{
|
||||
@@ -292,7 +292,7 @@ class Field extends UIContentBlock
|
||||
/**
|
||||
* @param \Combodo\iTop\Application\UI\Base\UIBlock $oValue
|
||||
*
|
||||
* @return Field
|
||||
* @return $this
|
||||
*/
|
||||
public function SetValue(UIBlock $oValue)
|
||||
{
|
||||
@@ -312,7 +312,7 @@ class Field extends UIContentBlock
|
||||
/**
|
||||
* @param string $sComments
|
||||
*
|
||||
* @return Field
|
||||
* @return $this
|
||||
*/
|
||||
public function SetComments(string $sComments)
|
||||
{
|
||||
@@ -344,10 +344,14 @@ class Field extends UIContentBlock
|
||||
public function SetInputId(string $sInputId)
|
||||
{
|
||||
$this->AddDataAttribute('input-id', $sInputId);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function SetInputType(string $sInputType)
|
||||
{
|
||||
$this->AddDataAttribute('input-type', $sInputType);
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
@@ -32,7 +32,7 @@ class Form extends UIContentBlock
|
||||
$this->sAction = null;
|
||||
}
|
||||
|
||||
public function SetOnSubmitJsCode(string $sJsCode): Form
|
||||
public function SetOnSubmitJsCode(string $sJsCode)
|
||||
{
|
||||
$this->sOnSubmitJsCode = $sJsCode;
|
||||
return $this;
|
||||
@@ -59,7 +59,7 @@ class Form extends UIContentBlock
|
||||
*
|
||||
* @return Form
|
||||
*/
|
||||
public function SetAction(string $sAction): Form
|
||||
public function SetAction(string $sAction)
|
||||
{
|
||||
$this->sAction = $sAction;
|
||||
return $this;
|
||||
|
||||
@@ -97,7 +97,7 @@ class GlobalSearch extends UIBlock implements iKeyboardShortcut
|
||||
* @return string
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function GetEndpoint()
|
||||
public function GetEndpoint(): string
|
||||
{
|
||||
return $this->sEndpoint;
|
||||
}
|
||||
@@ -151,7 +151,7 @@ class GlobalSearch extends UIBlock implements iKeyboardShortcut
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function GetLastQueries()
|
||||
public function GetLastQueries(): array
|
||||
{
|
||||
return $this->aLastQueries;
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ class Html extends UIBlock
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function GetHtml()
|
||||
public function GetHtml(): string
|
||||
{
|
||||
return $this->sHtml;
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ class FileSelect extends UIBlock
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function GetFileName()
|
||||
public function GetFileName(): string
|
||||
{
|
||||
return $this->sFileName;
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ class Input extends AbstractInput
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function IsChecked()
|
||||
public function IsChecked(): bool
|
||||
{
|
||||
return $this->bIsChecked;
|
||||
}
|
||||
@@ -69,7 +69,7 @@ class Input extends AbstractInput
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function IsDisabled()
|
||||
public function IsDisabled(): bool
|
||||
{
|
||||
return $this->bIsDisabled;
|
||||
}
|
||||
@@ -88,7 +88,7 @@ class Input extends AbstractInput
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function IsReadonly()
|
||||
public function IsReadonly(): bool
|
||||
{
|
||||
return $this->bIsReadonly;
|
||||
}
|
||||
@@ -107,7 +107,7 @@ class Input extends AbstractInput
|
||||
/**
|
||||
* @return string|null
|
||||
*/
|
||||
public function GetLabel()
|
||||
public function GetLabel(): ?string
|
||||
{
|
||||
return $this->sLabel;
|
||||
}
|
||||
@@ -124,7 +124,7 @@ class Input extends AbstractInput
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function HasLabel()
|
||||
public function HasLabel(): bool
|
||||
{
|
||||
return !is_null($this->sLabel);
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ class InputWithLabel extends UIBlock
|
||||
*
|
||||
* @return InputWithLabel
|
||||
*/
|
||||
public function SetLabel(string $sLabel): InputWithLabel
|
||||
public function SetLabel(string $sLabel)
|
||||
{
|
||||
$this->sLabel = $sLabel;
|
||||
return $this;
|
||||
|
||||
@@ -89,8 +89,10 @@ class Select extends UIContentBlock
|
||||
/**
|
||||
* @param bool $bIsMultiple {@see Select::$bIsMultiple}
|
||||
*/
|
||||
public function SetIsMultiple(bool $bIsMultiple): void
|
||||
public function SetIsMultiple(bool $bIsMultiple)
|
||||
{
|
||||
$this->bIsMultiple = $bIsMultiple;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
@@ -38,7 +38,7 @@ class SelectOption extends UIBlock
|
||||
*
|
||||
* @return SelectOption
|
||||
*/
|
||||
public function SetValue(string $sValue): SelectOption
|
||||
public function SetValue(string $sValue)
|
||||
{
|
||||
$this->sValue = $sValue;
|
||||
return $this;
|
||||
@@ -57,7 +57,7 @@ class SelectOption extends UIBlock
|
||||
*
|
||||
* @return SelectOption
|
||||
*/
|
||||
public function SetLabel(string $sLabel): SelectOption
|
||||
public function SetLabel(string $sLabel)
|
||||
{
|
||||
$this->sLabel = $sLabel;
|
||||
return $this;
|
||||
@@ -76,7 +76,7 @@ class SelectOption extends UIBlock
|
||||
*
|
||||
* @return SelectOption
|
||||
*/
|
||||
public function SetSelected(bool $bSelected): SelectOption
|
||||
public function SetSelected(bool $bSelected)
|
||||
{
|
||||
$this->bSelected = $bSelected;
|
||||
return $this;
|
||||
|
||||
@@ -78,10 +78,14 @@ class TextArea extends AbstractInput
|
||||
|
||||
/**
|
||||
* @param bool $bIsDisabled
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function SetIsDisabled(bool $bIsDisabled): void
|
||||
public function SetIsDisabled(bool $bIsDisabled)
|
||||
{
|
||||
$this->bIsDisabled = $bIsDisabled;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -32,9 +32,9 @@ class MedallionIcon extends UIBlock
|
||||
*
|
||||
* @param string $sImageUrl
|
||||
* @param string $sIconClass
|
||||
* @param null $sId
|
||||
* @param string|null $sId
|
||||
*/
|
||||
public function __construct($sImageUrl = '', $sIconClass = '', $sId = null)
|
||||
public function __construct(string $sImageUrl = '', string $sIconClass = '', ?string $sId = null)
|
||||
{
|
||||
parent::__construct($sId);
|
||||
$this->sImageUrl = $sImageUrl;
|
||||
@@ -44,7 +44,7 @@ class MedallionIcon extends UIBlock
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function GetImageUrl()
|
||||
public function GetImageUrl(): string
|
||||
{
|
||||
return $this->sImageUrl;
|
||||
}
|
||||
@@ -63,7 +63,7 @@ class MedallionIcon extends UIBlock
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function GetIconClass()
|
||||
public function GetIconClass(): string
|
||||
{
|
||||
return $this->sIconClass;
|
||||
}
|
||||
|
||||
@@ -390,7 +390,7 @@ class Panel extends UIContentBlock
|
||||
* @see static::$sCSSColorClass
|
||||
* @return string
|
||||
*/
|
||||
public function GetCSSColorClass()
|
||||
public function GetCSSColorClass(): string
|
||||
{
|
||||
return $this->sCSSColorClass;
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ class NewsroomMenu extends PopoverMenu
|
||||
*
|
||||
* @return false|string
|
||||
*/
|
||||
public function GetParamsAsJson()
|
||||
public function GetParamsAsJson(): string
|
||||
{
|
||||
return json_encode($this->aParams);
|
||||
}
|
||||
|
||||
@@ -372,7 +372,7 @@ class PopoverMenu extends UIBlock
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function HasSection(string $sId)
|
||||
public function HasSection(string $sId): bool
|
||||
{
|
||||
return array_key_exists($sId, $this->aSections);
|
||||
}
|
||||
@@ -402,7 +402,7 @@ class PopoverMenu extends UIBlock
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function GetSections()
|
||||
public function GetSections(): array
|
||||
{
|
||||
return $this->aSections;
|
||||
}
|
||||
@@ -520,7 +520,7 @@ class PopoverMenu extends UIBlock
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function GetSubBlocks()
|
||||
public function GetSubBlocks(): array
|
||||
{
|
||||
$aSubBlocks = [];
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ class JsPopoverMenuItem extends PopoverMenuItem
|
||||
* @inheritDoc
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function GetJsFilesUrlRecursively(bool $bAbsoluteUrl = false)
|
||||
public function GetJsFilesUrlRecursively(bool $bAbsoluteUrl = false): array
|
||||
{
|
||||
$aJsFiles = array_merge(parent::GetJsFilesUrlRecursively($bAbsoluteUrl), $this->oPopupMenuItem->GetLinkedScripts());
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ class PopoverMenuItem extends UIBlock
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
protected function GenerateId()
|
||||
protected function GenerateId(): string
|
||||
{
|
||||
return parent::GenerateId().'--'.utils::GetSafeId($this->oPopupMenuItem->GetUID());
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ class QuickCreate extends UIBlock implements iKeyboardShortcut
|
||||
* @return string
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function GetEndpoint()
|
||||
public function GetEndpoint(): string
|
||||
{
|
||||
return $this->sEndpoint;
|
||||
}
|
||||
@@ -117,7 +117,7 @@ class QuickCreate extends UIBlock implements iKeyboardShortcut
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function GetAvailableClasses()
|
||||
public function GetAvailableClasses(): array
|
||||
{
|
||||
return $this->aAvailableClasses;
|
||||
}
|
||||
@@ -171,7 +171,7 @@ class QuickCreate extends UIBlock implements iKeyboardShortcut
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function GetLastClasses()
|
||||
public function GetLastClasses(): array
|
||||
{
|
||||
return $this->aLastClasses;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user