mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-20 17:18:51 +02:00
Panel: Code formatting
This commit is contained in:
@@ -173,6 +173,74 @@ class Panel extends UIContentBlock
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see static::$oSubTitleBlock
|
||||
* @return bool
|
||||
*/
|
||||
public function HasSubTitle(): bool
|
||||
{
|
||||
return $this->oSubTitleBlock->HasSubBlocks();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see static::$oSubTitleBlock
|
||||
* @return string
|
||||
*/
|
||||
public function GetSubTitleBlock()
|
||||
{
|
||||
return $this->oSubTitleBlock;
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper to set the subtitle from a simple text ($sSubTitle), replacing any existing block
|
||||
*
|
||||
* @see static::$oSubTitleBlock
|
||||
*
|
||||
* @param string $sSubTitle
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function SetSubTitle(string $sSubTitle)
|
||||
{
|
||||
$this->oSubTitleBlock->AddHtml($sSubTitle);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a UIBlock to the subtitle
|
||||
*
|
||||
* @see static::$oSubTitleBlock
|
||||
*
|
||||
* @param \Combodo\iTop\Application\UI\Base\iUIBlock $oBlock
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function AddSubTitleBlock(iUIBlock $oBlock)
|
||||
{
|
||||
$this->oSubTitleBlock->AddSubBlock($oBlock);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add all $aBlocks to the subtitle
|
||||
*
|
||||
* @see static::$oSubTitleBlock
|
||||
*
|
||||
* @param array $aBlocks
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function AddSubTitleBlocks(array $aBlocks)
|
||||
{
|
||||
foreach ($aBlocks as $oBlock) {
|
||||
$this->AddSubTitleBlock($oBlock);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see static::$sIconUrl
|
||||
* @return bool
|
||||
@@ -286,65 +354,6 @@ class Panel extends UIContentBlock
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see static::$oSubTitleBlock
|
||||
* @return bool
|
||||
*/
|
||||
public function HasSubTitle(): bool
|
||||
{
|
||||
return $this->oSubTitleBlock->HasSubBlocks();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see static::$oSubTitleBlock
|
||||
* @return string
|
||||
*/
|
||||
public function GetSubTitleBlock()
|
||||
{
|
||||
return $this->oSubTitleBlock;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the subtitle from $sSubTitle, overwritting any existing block
|
||||
*
|
||||
* @see static::$oSubTitleBlock
|
||||
*
|
||||
* @param string $sSubTitle
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function SetSubTitle(string $sSubTitle)
|
||||
{
|
||||
$this->oSubTitleBlock->AddHtml($sSubTitle);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a UIBlock to the subtitle
|
||||
*
|
||||
* @see static::$oSubTitleBlock
|
||||
*
|
||||
* @param \Combodo\iTop\Application\UI\Base\iUIBlock $oBlock
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function AddSubTitleBlock(iUIBlock $oBlock)
|
||||
{
|
||||
$this->oSubTitleBlock->AddSubBlock($oBlock);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function AddSubTitleBlocks(array $aBlocks)
|
||||
{
|
||||
foreach ($aBlocks as $oBlock) {
|
||||
$this->AddSubTitleBlock($oBlock);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user