mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 18:48:51 +02:00
N°8851 - Explicit nullable in functions parameters
This commit is contained in:
@@ -126,7 +126,7 @@ class CKEditorHelper
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public static function PrepareCKEditorValueTextEncodingForTextarea(string $sValue = null): ?string
|
||||
public static function PrepareCKEditorValueTextEncodingForTextarea(?string $sValue = null): ?string
|
||||
{
|
||||
if ($sValue === null) {
|
||||
return null;
|
||||
@@ -145,7 +145,7 @@ class CKEditorHelper
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function ConfigureCKEditorElementForWebPage(WebPage $oPage, string $sInputElementId, string $sInitialValue = null, bool $bWithMentions = false, array $aOverloadConfiguration = []): void
|
||||
public static function ConfigureCKEditorElementForWebPage(WebPage $oPage, string $sInputElementId, ?string $sInitialValue = null, bool $bWithMentions = false, array $aOverloadConfiguration = []): void
|
||||
{
|
||||
// link CKEditor JS files
|
||||
foreach (static::GetJSFilesRelPathsForCKEditor() as $sFile) {
|
||||
@@ -187,7 +187,7 @@ class CKEditorHelper
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function ConfigureCKEditorElementForRenderingOutput(RenderingOutput $oOutput, string $sInputElementId, string $sInitialValue = null, bool $bWithMentions = false, bool $bAddJSFiles = true, array $aOverloadConfiguration = []): void
|
||||
public static function ConfigureCKEditorElementForRenderingOutput(RenderingOutput $oOutput, string $sInputElementId, ?string $sInitialValue = null, bool $bWithMentions = false, bool $bAddJSFiles = true, array $aOverloadConfiguration = []): void
|
||||
{
|
||||
// link CKEditor JS files
|
||||
if ($bAddJSFiles) {
|
||||
@@ -282,7 +282,7 @@ HTML;
|
||||
* @throws \ConfigException
|
||||
* @throws \CoreException
|
||||
*/
|
||||
public static function GetDOMSanitizerForCKEditor(DOMSanitizer $oSanitizer = null): array
|
||||
public static function GetDOMSanitizerForCKEditor(?DOMSanitizer $oSanitizer = null): array
|
||||
{
|
||||
if ($oSanitizer === null) {
|
||||
/* @var $oSanitizer DOMSanitizer */
|
||||
|
||||
@@ -18,7 +18,7 @@ use User;
|
||||
*/
|
||||
class iTopNewsroomProvider extends NewsroomProviderBase
|
||||
{
|
||||
public function IsApplicable(User $oUser = null)
|
||||
public function IsApplicable(?User $oUser = null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ class Status
|
||||
* @throws \DictExceptionUnknownLanguage
|
||||
* @throws \MySQLException
|
||||
*/
|
||||
public function __construct(Config $oConfig = null)
|
||||
public function __construct(?Config $oConfig = null)
|
||||
{
|
||||
$this->StatusStartup($oConfig);
|
||||
}
|
||||
@@ -74,7 +74,7 @@ class Status
|
||||
* @throws \DictExceptionUnknownLanguage
|
||||
* @throws \MySQLException
|
||||
*/
|
||||
private function StatusStartup(Config $oConfig = null)
|
||||
private function StatusStartup(?Config $oConfig = null)
|
||||
{
|
||||
$this->StatusCheckConfigFile();
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ class Button extends UIBlock
|
||||
* @param string $sJsCode
|
||||
* @param string $sOnClickJsCode
|
||||
*/
|
||||
public function __construct(string $sLabel, string $sId = null, string $sTooltip = '', string $sIconClass = '', string $sActionType = self::DEFAULT_ACTION_TYPE, string $sColorScheme = self::DEFAULT_COLOR_SCHEME, string $sJsCode = '', string $sOnClickJsCode = '')
|
||||
public function __construct(string $sLabel, ?string $sId = null, string $sTooltip = '', string $sIconClass = '', string $sActionType = self::DEFAULT_ACTION_TYPE, string $sColorScheme = self::DEFAULT_COLOR_SCHEME, string $sJsCode = '', string $sOnClickJsCode = '')
|
||||
{
|
||||
// We only use resource ID (not sanitized) on button for now, but this might be reworked back into \UIBlock if needed
|
||||
if (!is_null($sId)) {
|
||||
|
||||
@@ -67,7 +67,7 @@ class ButtonJS extends Button
|
||||
*/
|
||||
public function __construct(
|
||||
string $sLabel,
|
||||
string $sId = null,
|
||||
?string $sId = null,
|
||||
string $sName = '',
|
||||
string $sValue = '',
|
||||
string $sType = self::DEFAULT_TYPE,
|
||||
|
||||
@@ -55,7 +55,7 @@ class ButtonUIBlockFactory extends AbstractUIBlockFactory
|
||||
*
|
||||
* @return \Combodo\iTop\Application\UI\Base\Component\Button\Button
|
||||
*/
|
||||
public static function MakeNeutral(string $sLabel, string $sName = null, ?string $sId = null)
|
||||
public static function MakeNeutral(string $sLabel, ?string $sName = null, ?string $sId = null)
|
||||
{
|
||||
$oButton = new ButtonJS($sLabel, $sId);
|
||||
$oButton->SetActionType(Button::ENUM_ACTION_TYPE_REGULAR)
|
||||
@@ -81,8 +81,8 @@ class ButtonUIBlockFactory extends AbstractUIBlockFactory
|
||||
*/
|
||||
public static function MakeForPrimaryAction(
|
||||
string $sLabel,
|
||||
string $sName = null,
|
||||
string $sValue = null,
|
||||
?string $sName = null,
|
||||
?string $sValue = null,
|
||||
bool $bIsSubmit = false,
|
||||
?string $sId = null
|
||||
) {
|
||||
@@ -102,8 +102,8 @@ class ButtonUIBlockFactory extends AbstractUIBlockFactory
|
||||
*/
|
||||
public static function MakeForSecondaryAction(
|
||||
string $sLabel,
|
||||
string $sName = null,
|
||||
string $sValue = null,
|
||||
?string $sName = null,
|
||||
?string $sValue = null,
|
||||
bool $bIsSubmit = false,
|
||||
?string $sId = null
|
||||
) {
|
||||
@@ -123,8 +123,8 @@ class ButtonUIBlockFactory extends AbstractUIBlockFactory
|
||||
*/
|
||||
public static function MakeForPositiveAction(
|
||||
string $sLabel,
|
||||
string $sName = null,
|
||||
string $sValue = null,
|
||||
?string $sName = null,
|
||||
?string $sValue = null,
|
||||
bool $bIsSubmit = false,
|
||||
?string $sId = null
|
||||
) {
|
||||
@@ -145,8 +145,8 @@ class ButtonUIBlockFactory extends AbstractUIBlockFactory
|
||||
*/
|
||||
public static function MakeForDestructiveAction(
|
||||
string $sLabel,
|
||||
string $sName = null,
|
||||
string $sValue = null,
|
||||
?string $sName = null,
|
||||
?string $sValue = null,
|
||||
bool $bIsSubmit = false,
|
||||
?string $sId = null
|
||||
) {
|
||||
@@ -178,8 +178,8 @@ class ButtonUIBlockFactory extends AbstractUIBlockFactory
|
||||
*/
|
||||
public static function MakeAlternativeNeutral(
|
||||
string $sLabel,
|
||||
string $sName = null,
|
||||
string $sValue = null,
|
||||
?string $sName = null,
|
||||
?string $sValue = null,
|
||||
bool $bIsSubmit = false,
|
||||
?string $sId = null
|
||||
) {
|
||||
@@ -208,8 +208,8 @@ class ButtonUIBlockFactory extends AbstractUIBlockFactory
|
||||
*/
|
||||
public static function MakeForAlternativePrimaryAction(
|
||||
string $sLabel,
|
||||
string $sName = null,
|
||||
string $sValue = null,
|
||||
?string $sName = null,
|
||||
?string $sValue = null,
|
||||
bool $bIsSubmit = false,
|
||||
?string $sId = null
|
||||
) {
|
||||
@@ -237,8 +237,8 @@ class ButtonUIBlockFactory extends AbstractUIBlockFactory
|
||||
*/
|
||||
public static function MakeForAlternativeSecondaryAction(
|
||||
string $sLabel,
|
||||
string $sName = null,
|
||||
string $sValue = null,
|
||||
?string $sName = null,
|
||||
?string $sValue = null,
|
||||
bool $bIsSubmit = false,
|
||||
?string $sId = null
|
||||
) {
|
||||
@@ -266,8 +266,8 @@ class ButtonUIBlockFactory extends AbstractUIBlockFactory
|
||||
*/
|
||||
public static function MakeForAlternativeValidationAction(
|
||||
string $sLabel,
|
||||
string $sName = null,
|
||||
string $sValue = null,
|
||||
?string $sName = null,
|
||||
?string $sValue = null,
|
||||
bool $bIsSubmit = false,
|
||||
?string $sId = null
|
||||
) {
|
||||
@@ -295,8 +295,8 @@ class ButtonUIBlockFactory extends AbstractUIBlockFactory
|
||||
*/
|
||||
public static function MakeForAlternativeDestructiveAction(
|
||||
string $sLabel,
|
||||
string $sName = null,
|
||||
string $sValue = null,
|
||||
?string $sName = null,
|
||||
?string $sValue = null,
|
||||
bool $bIsSubmit = false,
|
||||
?string $sId = null
|
||||
) {
|
||||
@@ -323,9 +323,9 @@ class ButtonUIBlockFactory extends AbstractUIBlockFactory
|
||||
* @return \Combodo\iTop\Application\UI\Base\Component\Button\Button
|
||||
*/
|
||||
public static function MakeForCancel(
|
||||
string $sLabel = null,
|
||||
string $sName = null,
|
||||
string $sValue = null,
|
||||
?string $sLabel = null,
|
||||
?string $sName = null,
|
||||
?string $sValue = null,
|
||||
bool $bIsSubmit = false,
|
||||
?string $sId = null
|
||||
) {
|
||||
@@ -356,8 +356,8 @@ class ButtonUIBlockFactory extends AbstractUIBlockFactory
|
||||
public static function MakeIconAction(
|
||||
string $sIconClasses,
|
||||
string $sTooltipText = '',
|
||||
string $sName = null,
|
||||
string $sValue = null,
|
||||
?string $sName = null,
|
||||
?string $sValue = null,
|
||||
bool $bIsSubmit = false,
|
||||
?string $sId = null
|
||||
) {
|
||||
@@ -483,8 +483,8 @@ class ButtonUIBlockFactory extends AbstractUIBlockFactory
|
||||
string $sLabel,
|
||||
string $sColor,
|
||||
string $sActionType,
|
||||
string $sValue = null,
|
||||
string $sName = null,
|
||||
?string $sValue = null,
|
||||
?string $sName = null,
|
||||
bool $bIsSubmit = false,
|
||||
?string $sId = null
|
||||
) {
|
||||
@@ -528,7 +528,7 @@ class ButtonUIBlockFactory extends AbstractUIBlockFactory
|
||||
string $sURL,
|
||||
string $sColor,
|
||||
string $sActionType,
|
||||
string $sTarget = null,
|
||||
?string $sTarget = null,
|
||||
?string $sId = null
|
||||
) {
|
||||
$oButton = new ButtonURL($sLabel, $sURL, $sId, $sTarget);
|
||||
|
||||
@@ -67,7 +67,7 @@ class ButtonURL extends Button
|
||||
public function __construct(
|
||||
string $sLabel,
|
||||
string $sURL,
|
||||
string $sId = null,
|
||||
?string $sId = null,
|
||||
string $sTarget = self::DEFAULT_TARGET,
|
||||
string $sTooltip = '',
|
||||
string $sIconClass = '',
|
||||
|
||||
@@ -14,7 +14,7 @@ class DashletContainer extends UIContentBlock
|
||||
public const BLOCK_CODE = 'ibo-dashlet';
|
||||
public const DEFAULT_HTML_TEMPLATE_REL_PATH = 'base/layouts/content-block/layout';
|
||||
|
||||
public function __construct(string $sId = null, array $aContainerClasses = [])
|
||||
public function __construct(?string $sId = null, array $aContainerClasses = [])
|
||||
{
|
||||
parent::__construct($sId, $aContainerClasses);
|
||||
|
||||
|
||||
@@ -22,12 +22,12 @@ class DashletFactory
|
||||
return new DashletBadge($sClassIconUrl, $sHyperlink, $iCount, $sClassLabel, $sCreateActionUrl, $sCreateActionLabel, $aRefreshParams);
|
||||
}
|
||||
|
||||
public static function MakeForDashletHeaderStatic(string $sTitle, string $sIconUrl, string $sId = null): DashletHeaderStatic
|
||||
public static function MakeForDashletHeaderStatic(string $sTitle, string $sIconUrl, ?string $sId = null): DashletHeaderStatic
|
||||
{
|
||||
return new DashletHeaderStatic($sTitle, $sIconUrl, $sId);
|
||||
}
|
||||
|
||||
public static function MakeForDashletPlainText(string $sText, string $sId = null): DashletPlainText
|
||||
public static function MakeForDashletPlainText(string $sText, ?string $sId = null): DashletPlainText
|
||||
{
|
||||
return new DashletPlainText($sText, $sId);
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ class DashletHeaderStatic extends DashletContainer
|
||||
* @param string $sIconUrl
|
||||
* @param string|null $sId
|
||||
*/
|
||||
public function __construct(string $sTitle, string $sIconUrl, string $sId = null)
|
||||
public function __construct(string $sTitle, string $sIconUrl, ?string $sId = null)
|
||||
{
|
||||
parent::__construct($sId);
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ class DashletPlainText extends DashletContainer
|
||||
*
|
||||
* @param string $sText
|
||||
*/
|
||||
public function __construct(string $sText, string $sId = null)
|
||||
public function __construct(string $sText, ?string $sId = null)
|
||||
{
|
||||
parent::__construct($sId);
|
||||
|
||||
|
||||
@@ -855,7 +855,7 @@ JS;
|
||||
*
|
||||
* @return \Combodo\iTop\Application\UI\Base\Layout\UIContentBlock
|
||||
*/
|
||||
public static function MakeForStaticData(string $sTitle, array $aColumns, array $aData, ?string $sId = null, array $aExtraParams = [], string $sFilter = "", array $aOptions = [], array $aRowActions = null)
|
||||
public static function MakeForStaticData(string $sTitle, array $aColumns, array $aData, ?string $sId = null, array $aExtraParams = [], string $sFilter = "", array $aOptions = [], ?array $aRowActions = null)
|
||||
{
|
||||
$oBlock = new UIContentBlock();
|
||||
if ($sTitle != "") {
|
||||
@@ -896,7 +896,7 @@ JS;
|
||||
*
|
||||
* @return \Combodo\iTop\Application\UI\Base\Component\DataTable\StaticTable\FormTable\FormTable
|
||||
*/
|
||||
public static function MakeForForm(string $sRef, array $aColumns, array $aData = [], string $sFilter = '', array $aRowActions = null)
|
||||
public static function MakeForForm(string $sRef, array $aColumns, array $aData = [], string $sFilter = '', ?array $aRowActions = null)
|
||||
{
|
||||
$oTable = new FormTable("datatable_".$sRef);
|
||||
$oTable->SetRef($sRef);
|
||||
|
||||
@@ -67,7 +67,7 @@ class StaticTable extends UIContentBlock
|
||||
*/
|
||||
private $aOptions;
|
||||
|
||||
public function __construct(string $sId = null, array $aContainerCSSClasses = [], array $aExtraParams = [])
|
||||
public function __construct(?string $sId = null, array $aContainerCSSClasses = [], array $aExtraParams = [])
|
||||
{
|
||||
parent::__construct($sId, $aContainerCSSClasses);
|
||||
$this->aColumns = [];
|
||||
|
||||
@@ -57,7 +57,7 @@ class Field extends UIContentBlock
|
||||
/** @var string */
|
||||
protected $sComments;
|
||||
|
||||
public function __construct(string $sLabel, UIBlock $oValue = null, ?string $sId = null)
|
||||
public function __construct(string $sLabel, ?UIBlock $oValue = null, ?string $sId = null)
|
||||
{
|
||||
parent::__construct($sId);
|
||||
$this->sLabel = $sLabel;
|
||||
|
||||
@@ -19,7 +19,7 @@ class FieldBadge extends UIContentBlock
|
||||
// Overloaded constants
|
||||
public const BLOCK_CODE = 'ibo-field-badge';
|
||||
|
||||
public function __construct(string $sId = null, array $aContainerClasses = [])
|
||||
public function __construct(?string $sId = null, array $aContainerClasses = [])
|
||||
{
|
||||
parent::__construct($sId, $aContainerClasses);
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ class Form extends UIContentBlock
|
||||
/** @var string */
|
||||
protected $sAction;
|
||||
|
||||
public function __construct(string $sId = null)
|
||||
public function __construct(?string $sId = null)
|
||||
{
|
||||
parent::__construct($sId);
|
||||
$this->sOnSubmitJsCode = null;
|
||||
|
||||
@@ -30,7 +30,7 @@ class FormUIBlockFactory extends AbstractUIBlockFactory
|
||||
*
|
||||
* @return \Combodo\iTop\Application\UI\Base\Component\Form\Form An HTML form in which you can add UIBlocks
|
||||
*/
|
||||
public static function MakeStandard(string $sId = null)
|
||||
public static function MakeStandard(?string $sId = null)
|
||||
{
|
||||
return new Form($sId);
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ class FileSelect extends UIBlock
|
||||
/** @var bool */
|
||||
private $bShowFilename;
|
||||
|
||||
public function __construct(string $sName, string $sId = null)
|
||||
public function __construct(string $sName, ?string $sId = null)
|
||||
{
|
||||
parent::__construct($sId);
|
||||
$this->sName = $sName;
|
||||
|
||||
@@ -31,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)
|
||||
public static function MakeStandard(string $sName, ?string $sId = null)
|
||||
{
|
||||
return new FileSelect($sName, $sId);
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ class AjaxDataProviderForOQL extends AjaxDataProvider
|
||||
* @param string|null $sWizardHelperJsVarName Wizard helper name
|
||||
* @param array $aFieldsToLoad Array of fields to load
|
||||
*/
|
||||
public function __construct(string $sObjectClass, string $sOql, string $sWizardHelperJsVarName = null, array $aFieldsToLoad = [])
|
||||
public function __construct(string $sObjectClass, string $sOql, ?string $sWizardHelperJsVarName = null, array $aFieldsToLoad = [])
|
||||
{
|
||||
parent::__construct('object.search', [
|
||||
'object_class' => $sObjectClass,
|
||||
|
||||
@@ -107,7 +107,7 @@ class Set extends AbstractInput
|
||||
*
|
||||
* @param string|null $sId Block identifier
|
||||
*/
|
||||
public function __construct(string $sId = null)
|
||||
public function __construct(?string $sId = null)
|
||||
{
|
||||
parent::__construct($sId);
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@ class SetUIBlockFactory extends AbstractUIBlockFactory
|
||||
*
|
||||
* @return \Combodo\iTop\Application\UI\Base\Component\Input\Set\Set
|
||||
*/
|
||||
public static function MakeForOQL(string $sId, string $sObjectClass, string $sOql, string $sWizardHelperJsVarName = null, array $aFieldsToLoad = [], ?string $sGroupField = null, string $sName = ''): Set
|
||||
public static function MakeForOQL(string $sId, string $sObjectClass, string $sOql, ?string $sWizardHelperJsVarName = null, array $aFieldsToLoad = [], ?string $sGroupField = null, string $sName = ''): Set
|
||||
{
|
||||
// Create set ui block
|
||||
$oSetUIBlock = new Set($sId);
|
||||
|
||||
@@ -36,7 +36,7 @@ class DoNotShowAgainOptionBlock extends UIContentBlock
|
||||
*
|
||||
* @param string|null $sId
|
||||
*/
|
||||
public function __construct(string $sId = null)
|
||||
public function __construct(?string $sId = null)
|
||||
{
|
||||
parent::__construct($sId, ['ibo-modal-option--do-not-show-again']);
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ class PanelUIBlockFactory extends AbstractUIBlockFactory
|
||||
*
|
||||
* @return \Combodo\iTop\Application\UI\Base\Component\Panel\Panel
|
||||
*/
|
||||
public static function MakeNeutral(string $sTitle, string $sSubTitle = null)
|
||||
public static function MakeNeutral(string $sTitle, ?string $sSubTitle = null)
|
||||
{
|
||||
$oPanel = new Panel($sTitle);
|
||||
if (!is_null($sSubTitle)) {
|
||||
@@ -68,7 +68,7 @@ class PanelUIBlockFactory extends AbstractUIBlockFactory
|
||||
*
|
||||
* @return \Combodo\iTop\Application\UI\Base\Component\Panel\Panel
|
||||
*/
|
||||
public static function MakeForInformation(string $sTitle, string $sSubTitle = null)
|
||||
public static function MakeForInformation(string $sTitle, ?string $sSubTitle = null)
|
||||
{
|
||||
$oPanel = new Panel($sTitle);
|
||||
if (!is_null($sSubTitle)) {
|
||||
@@ -88,7 +88,7 @@ class PanelUIBlockFactory extends AbstractUIBlockFactory
|
||||
*
|
||||
* @return \Combodo\iTop\Application\UI\Base\Component\Panel\Panel
|
||||
*/
|
||||
public static function MakeForSuccess(string $sTitle, string $sSubTitle = null)
|
||||
public static function MakeForSuccess(string $sTitle, ?string $sSubTitle = null)
|
||||
{
|
||||
$oPanel = new Panel($sTitle);
|
||||
if (!is_null($sSubTitle)) {
|
||||
@@ -108,7 +108,7 @@ class PanelUIBlockFactory extends AbstractUIBlockFactory
|
||||
*
|
||||
* @return \Combodo\iTop\Application\UI\Base\Component\Panel\Panel
|
||||
*/
|
||||
public static function MakeForWarning(string $sTitle, string $sSubTitle = null)
|
||||
public static function MakeForWarning(string $sTitle, ?string $sSubTitle = null)
|
||||
{
|
||||
$oPanel = new Panel($sTitle);
|
||||
if (!is_null($sSubTitle)) {
|
||||
@@ -128,7 +128,7 @@ class PanelUIBlockFactory extends AbstractUIBlockFactory
|
||||
*
|
||||
* @return \Combodo\iTop\Application\UI\Base\Component\Panel\Panel
|
||||
*/
|
||||
public static function MakeForDanger(string $sTitle, string $sSubTitle = null)
|
||||
public static function MakeForDanger(string $sTitle, ?string $sSubTitle = null)
|
||||
{
|
||||
$oPanel = new Panel($sTitle);
|
||||
if (!is_null($sSubTitle)) {
|
||||
@@ -148,7 +148,7 @@ class PanelUIBlockFactory extends AbstractUIBlockFactory
|
||||
*
|
||||
* @return \Combodo\iTop\Application\UI\Base\Component\Panel\Panel
|
||||
*/
|
||||
public static function MakeForFailure(string $sTitle, string $sSubTitle = null)
|
||||
public static function MakeForFailure(string $sTitle, ?string $sSubTitle = null)
|
||||
{
|
||||
$oPanel = new Panel($sTitle);
|
||||
if (!is_null($sSubTitle)) {
|
||||
@@ -168,7 +168,7 @@ class PanelUIBlockFactory extends AbstractUIBlockFactory
|
||||
*
|
||||
* @return \Combodo\iTop\Application\UI\Base\Component\Panel\Panel
|
||||
*/
|
||||
public static function MakeWithBrandingPrimaryColor(string $sTitle, string $sSubTitle = null)
|
||||
public static function MakeWithBrandingPrimaryColor(string $sTitle, ?string $sSubTitle = null)
|
||||
{
|
||||
$oPanel = new Panel($sTitle);
|
||||
if (!is_null($sSubTitle)) {
|
||||
@@ -188,7 +188,7 @@ class PanelUIBlockFactory extends AbstractUIBlockFactory
|
||||
*
|
||||
* @return \Combodo\iTop\Application\UI\Base\Component\Panel\Panel
|
||||
*/
|
||||
public static function MakeWithBrandingSecondaryColor(string $sTitle, string $sSubTitle = null)
|
||||
public static function MakeWithBrandingSecondaryColor(string $sTitle, ?string $sSubTitle = null)
|
||||
{
|
||||
$oPanel = new Panel($sTitle);
|
||||
if (!is_null($sSubTitle)) {
|
||||
@@ -209,7 +209,7 @@ class PanelUIBlockFactory extends AbstractUIBlockFactory
|
||||
*
|
||||
* @return \Combodo\iTop\Application\UI\Base\Component\Panel\Panel
|
||||
*/
|
||||
public static function MakeForClass(string $sClass, string $sTitle, string $sSubTitle = null)
|
||||
public static function MakeForClass(string $sClass, string $sTitle, ?string $sSubTitle = null)
|
||||
{
|
||||
$oPanel = new Panel($sTitle);
|
||||
if (!is_null($sSubTitle)) {
|
||||
|
||||
@@ -31,7 +31,7 @@ class ToolbarSeparatorUIBlockFactory extends AbstractUIBlockFactory
|
||||
*
|
||||
* @return \Combodo\iTop\Application\UI\Base\Component\Toolbar\Separator\VerticalSeparator
|
||||
*/
|
||||
public static function MakeVertical(string $sId = null)
|
||||
public static function MakeVertical(?string $sId = null)
|
||||
{
|
||||
return new VerticalSeparator($sId);
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ class Toolbar extends UIContentBlock
|
||||
public const BLOCK_CODE = 'ibo-toolbar';
|
||||
public const DEFAULT_HTML_TEMPLATE_REL_PATH = 'base/components/toolbar/layout';
|
||||
|
||||
public function __construct(string $sId = null, array $aContainerClasses = [])
|
||||
public function __construct(?string $sId = null, array $aContainerClasses = [])
|
||||
{
|
||||
parent::__construct($sId, $aContainerClasses);
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ class ToolbarSpacerUIBlockFactory extends AbstractUIBlockFactory
|
||||
*
|
||||
* @return \Combodo\iTop\Application\UI\Base\Component\Toolbar\ToolbarSpacer\ToolbarSpacer
|
||||
*/
|
||||
public static function MakeStandard(string $sId = null)
|
||||
public static function MakeStandard(?string $sId = null)
|
||||
{
|
||||
return new ToolbarSpacer($sId);
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ class ToolbarUIBlockFactory extends AbstractUIBlockFactory
|
||||
*
|
||||
* @return \Combodo\iTop\Application\UI\Base\Component\Toolbar\Toolbar
|
||||
*/
|
||||
public static function MakeForAction(string $sId = null)
|
||||
public static function MakeForAction(?string $sId = null)
|
||||
{
|
||||
return new Toolbar($sId, ['ibo-toolbar--action']);
|
||||
}
|
||||
@@ -42,7 +42,7 @@ class ToolbarUIBlockFactory extends AbstractUIBlockFactory
|
||||
*
|
||||
* @return \Combodo\iTop\Application\UI\Base\Component\Toolbar\Toolbar
|
||||
*/
|
||||
public static function MakeStandard(string $sId = null, array $aContainerClasses = [])
|
||||
public static function MakeStandard(?string $sId = null, array $aContainerClasses = [])
|
||||
{
|
||||
return new Toolbar($sId, $aContainerClasses);
|
||||
}
|
||||
@@ -54,7 +54,7 @@ class ToolbarUIBlockFactory extends AbstractUIBlockFactory
|
||||
*
|
||||
* @return \Combodo\iTop\Application\UI\Base\Component\Toolbar\Toolbar
|
||||
*/
|
||||
public static function MakeForButton(string $sId = null, array $aContainerClasses = [])
|
||||
public static function MakeForButton(?string $sId = null, array $aContainerClasses = [])
|
||||
{
|
||||
return new Toolbar($sId, array_merge($aContainerClasses, ['ibo-toolbar--button']));
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ class CaseLogEntryForm extends UIContentBlock
|
||||
* @param \DBObject $oObject
|
||||
* @param string|null $sId
|
||||
*/
|
||||
public function __construct(DBObject $oObject, string $sAttCode, string $sId = null)
|
||||
public function __construct(DBObject $oObject, string $sAttCode, ?string $sId = null)
|
||||
{
|
||||
parent::__construct($sId);
|
||||
$this->oObject = $oObject;
|
||||
|
||||
@@ -107,7 +107,7 @@ class NavigationMenu extends UIBlock implements iKeyboardShortcut
|
||||
public function __construct(
|
||||
ApplicationContext $oAppContext,
|
||||
PopoverMenu $oUserMenu,
|
||||
NewsroomMenu $oNewsroomMenu = null,
|
||||
?NewsroomMenu $oNewsroomMenu = null,
|
||||
?string $sId = null
|
||||
) {
|
||||
parent::__construct($sId);
|
||||
|
||||
@@ -59,9 +59,9 @@ class TopBar extends UIBlock
|
||||
*/
|
||||
public function __construct(
|
||||
$sId = null,
|
||||
QuickCreate $oQuickCreate = null,
|
||||
GlobalSearch $oGlobalSearch = null,
|
||||
Breadcrumbs $oBreadcrumbs = null
|
||||
?QuickCreate $oQuickCreate = null,
|
||||
?GlobalSearch $oGlobalSearch = null,
|
||||
?Breadcrumbs $oBreadcrumbs = null
|
||||
) {
|
||||
parent::__construct($sId);
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ class UIContentBlock extends UIBlock implements iUIContentBlock
|
||||
* @param string|null $sId
|
||||
* @param array $aContainerClasses Array of additional CSS classes
|
||||
*/
|
||||
public function __construct(string $sId = null, array $aContainerClasses = [])
|
||||
public function __construct(?string $sId = null, array $aContainerClasses = [])
|
||||
{
|
||||
parent::__construct($sId);
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ class UIContentBlockUIBlockFactory extends AbstractUIBlockFactory
|
||||
*
|
||||
* @return \Combodo\iTop\Application\UI\Base\Layout\UIContentBlock
|
||||
*/
|
||||
public static function MakeStandard(string $sId = null, array $aContainerClasses = [])
|
||||
public static function MakeStandard(?string $sId = null, array $aContainerClasses = [])
|
||||
{
|
||||
return new UIContentBlock($sId, $aContainerClasses);
|
||||
}
|
||||
@@ -49,7 +49,7 @@ class UIContentBlockUIBlockFactory extends AbstractUIBlockFactory
|
||||
*
|
||||
* @return \Combodo\iTop\Application\UI\Base\Layout\UIContentBlock
|
||||
*/
|
||||
public static function MakeForCode(string $sCode, string $sId = null)
|
||||
public static function MakeForCode(string $sCode, ?string $sId = null)
|
||||
{
|
||||
$sCode = str_replace("\n", '<br>', \utils::HtmlEntities($sCode));
|
||||
|
||||
@@ -65,7 +65,7 @@ class UIContentBlockUIBlockFactory extends AbstractUIBlockFactory
|
||||
*
|
||||
* @return \Combodo\iTop\Application\UI\Base\Layout\UIContentBlock
|
||||
*/
|
||||
public static function MakeForPreformatted(string $sCode, string $sId = null)
|
||||
public static function MakeForPreformatted(string $sCode, ?string $sId = null)
|
||||
{
|
||||
$sCode = '<pre>'.\utils::HtmlEntities($sCode).'</pre>';
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ use Throwable;
|
||||
|
||||
class UIException extends Exception
|
||||
{
|
||||
public function __construct(iUIBlock $oBlock, string $message = "", int $code = 0, Throwable $previous = null)
|
||||
public function __construct(iUIBlock $oBlock, string $message = "", int $code = 0, ?Throwable $previous = null)
|
||||
{
|
||||
parent::__construct($oBlock->GetId().': '.$message, $code, $previous);
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@ abstract class AbstractBlockLinkSetViewTable extends UIContentBlock
|
||||
* @throws \ArchivedObjectException
|
||||
* @throws \CoreException
|
||||
*/
|
||||
public function GetDictionaryEntry(string $sKey, DBObject $oDBObject = null)
|
||||
public function GetDictionaryEntry(string $sKey, ?DBObject $oDBObject = null)
|
||||
{
|
||||
return $this->oAttDef->SearchSpecificLabel(
|
||||
$sKey,
|
||||
|
||||
@@ -51,7 +51,7 @@ class LinkSetUIBlockFactory extends SetUIBlockFactory
|
||||
*
|
||||
* @return \Combodo\iTop\Application\UI\Base\Component\Input\Set\Set
|
||||
*/
|
||||
public static function MakeForLinkSet(string $sId, AttributeLinkedSet $oAttDef, iDBObjectSetIterator $oDbObjectSet, string $sWizardHelperJsVarName, DBObject $oHostDbObject = null): Set
|
||||
public static function MakeForLinkSet(string $sId, AttributeLinkedSet $oAttDef, iDBObjectSetIterator $oDbObjectSet, string $sWizardHelperJsVarName, ?DBObject $oHostDbObject = null): Set
|
||||
{
|
||||
$sTargetClass = LinkSetModel::GetTargetClass($oAttDef);
|
||||
$sTargetField = LinkSetModel::GetTargetField($oAttDef);
|
||||
|
||||
@@ -92,7 +92,7 @@ class AjaxPage extends WebPage implements iTabbedPage
|
||||
* @inheritDoc
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function AddTabContainer($sTabContainer, $sPrefix = '', iUIContentBlock $oParentBlock = null)
|
||||
public function AddTabContainer($sTabContainer, $sPrefix = '', ?iUIContentBlock $oParentBlock = null)
|
||||
{
|
||||
if (is_null($oParentBlock)) {
|
||||
$oParentBlock = PanelUIBlockFactory::MakeNeutral('');
|
||||
|
||||
@@ -248,7 +248,7 @@ class TabManager
|
||||
* @param string $sTabCode
|
||||
* @param string|null $sTabContainer
|
||||
*/
|
||||
public function RemoveTab(string $sTabCode, string $sTabContainer = null)
|
||||
public function RemoveTab(string $sTabCode, ?string $sTabContainer = null)
|
||||
{
|
||||
if ($sTabContainer == null) {
|
||||
$sTabContainer = $this->m_sCurrentTabContainer;
|
||||
@@ -272,7 +272,7 @@ class TabManager
|
||||
*
|
||||
* @return mixed The actual name of the tab (as a string) or false if not found
|
||||
*/
|
||||
public function FindTab(string $sPattern, string $sTabContainer = null)
|
||||
public function FindTab(string $sPattern, ?string $sTabContainer = null)
|
||||
{
|
||||
$result = false;
|
||||
if ($sTabContainer == null) {
|
||||
|
||||
@@ -18,7 +18,7 @@ interface iTabbedPage
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function AddTabContainer($sTabContainer, $sPrefix = '', iUIContentBlock $oParentBlock = null);
|
||||
public function AddTabContainer($sTabContainer, $sPrefix = '', ?iUIContentBlock $oParentBlock = null);
|
||||
|
||||
/**
|
||||
* @param string $sTabContainer
|
||||
|
||||
@@ -1024,7 +1024,7 @@ HTML;
|
||||
* @inheritDoc
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function AddTabContainer($sTabContainer, $sPrefix = '', iUIContentBlock $oParentBlock = null)
|
||||
public function AddTabContainer($sTabContainer, $sPrefix = '', ?iUIContentBlock $oParentBlock = null)
|
||||
{
|
||||
if (is_null($oParentBlock)) {
|
||||
$oParentBlock = PanelUIBlockFactory::MakeNeutral('');
|
||||
|
||||
Reference in New Issue
Block a user