mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-26 20:18:52 +02:00
N°8673 - Avoid server overload when user access news page with a lot of unread news (#816)
This commit is contained in:
@@ -33,6 +33,10 @@ class UIContentBlock extends UIBlock implements iUIContentBlock
|
||||
protected $aDeferredBlocks;
|
||||
/** @var bool If set to true, the content block will have a surrounding <div> no matter its options / CSS classes / ... */
|
||||
protected $bHasForcedDiv;
|
||||
/** @var bool if set to true, the icon will be lazy loaded
|
||||
* @since 3.2.3
|
||||
*/
|
||||
protected bool $bHasLazyLoadIcon;
|
||||
|
||||
/**
|
||||
* UIContentBlock constructor.
|
||||
@@ -48,6 +52,7 @@ class UIContentBlock extends UIBlock implements iUIContentBlock
|
||||
$this->aSubBlocks = [];
|
||||
$this->aDeferredBlocks = [];
|
||||
$this->bHasForcedDiv = false;
|
||||
$this->bHasLazyLoadIcon = false;
|
||||
$this->SetCSSClasses($aContainerClasses);
|
||||
}
|
||||
|
||||
@@ -220,4 +225,24 @@ class UIContentBlock extends UIBlock implements iUIContentBlock
|
||||
$this->bHasForcedDiv = $bHasForcedDiv;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see static::$bHasLazyLoadIcon
|
||||
* @return bool
|
||||
*/
|
||||
public function HasLazyLoadIcon(): bool
|
||||
{
|
||||
return $this->bHasLazyLoadIcon;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see static::$bHasLazyLoadIcon
|
||||
* @param bool $bLazyLoadIcon
|
||||
* @return $this
|
||||
*/
|
||||
public function SetHasLazyLoadIcon(bool $bLazyLoadIcon)
|
||||
{
|
||||
$this->bHasLazyLoadIcon = $bLazyLoadIcon;
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user