Rename subtitle block variable in PanelEnhanced

This commit is contained in:
Stephen Abello
2021-02-26 10:13:56 +01:00
parent da4cf8b661
commit 25c840e036
3 changed files with 9 additions and 9 deletions

View File

@@ -2056,7 +2056,7 @@ class DashletHeaderDynamic extends Dashlet
$sBlockId = 'block_'.$this->sId.($bEditMode ? '_edit' : ''); // make a unique id (edition occuring in the same DOM)
$oBlock->DisplayIntoContentBlock($oPanel, $oPage, $sBlockId, array_merge($aExtraParams, $aParams));
$oSubTitle = $oPanel->GetSubTitle();
$oSubTitle = $oPanel->GetSubTitleBlock();
$oSet = new DBObjectSet($oFilter);
$iCount = $oSet->Count();
$oAppContext = new ApplicationContext();

View File

@@ -16,7 +16,7 @@ class PanelEnhanced extends Panel
public const DEFAULT_HTML_TEMPLATE_REL_PATH = 'base/components/panel/panelenhanced';
/** @var UIContentBlock */
protected $sSubTitle;
protected $oSubTitleBlock;
/** @var string */
protected $sIconUrl;
@@ -29,26 +29,26 @@ class PanelEnhanced extends Panel
public function __construct(string $sTitle, string $sIconUrl)
{
parent::__construct($sTitle);
$this->sSubTitle = new UIContentBlock();
$this->oSubTitleBlock = new UIContentBlock();
$this->sIconUrl = $sIconUrl;
}
/**
* @return UIContentBlock
*/
public function GetSubTitle(): UIContentBlock
public function GetSubTitleBlock(): UIContentBlock
{
return $this->sSubTitle;
return $this->oSubTitleBlock;
}
/**
* @param UIContentBlock $sSubTitle
* @param \Combodo\iTop\Application\UI\Base\Layout\UIContentBlock $oSubTitleBlock
*
* @return PanelEnhanced
*/
public function SetSubTitle(UIContentBlock $sSubTitle): PanelEnhanced
public function SetSubTitleBlock(UIContentBlock $oSubTitleBlock): PanelEnhanced
{
$this->sSubTitle = $sSubTitle;
$this->oSubTitleBlock = $oSubTitleBlock;
return $this;
}

View File

@@ -9,7 +9,7 @@
<div class="ibo-panel--title-title">
<div class="ibo-panel--title-title-title">{{ oUIBlock.GetTitle() }}</div>
<div class="ibo-panel--title-title-subtitle">
{% for oSubBlock in oUIBlock.GetSubTitle().GetSubBlocks() %}
{% for oSubBlock in oUIBlock.GetSubTitleBlock().GetSubBlocks() %}
{{ render_block(oSubBlock, {aPage: aPage}) }}
{% endfor %}
</div>