N°2847 - Code refactor

This commit is contained in:
Eric
2020-11-25 15:24:27 +01:00
parent fc24746862
commit c5942a3ddd
10 changed files with 411 additions and 314 deletions

View File

@@ -73,4 +73,18 @@ class Html extends UIBlock
return $this;
}
/**
* Add HTML, must be already sanitized
*
* @param string $sHtml
*
* @return $this
*/
public function AddHtml(string $sHtml)
{
$this->sHtml .= $sHtml;
return $this;
}
}

View File

@@ -0,0 +1,23 @@
<?php
/**
* @copyright Copyright (C) 2010-2020 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
*/
namespace Combodo\iTop\Application\Service;
use Combodo\iTop\Application\UI\iUIBlock;
use DBSearch;
use DisplayBlock;
use WebPage;
class DisplayBlockFactory
{
public static function GetUIBlockForList(DBSearch $oFilter, WebPage $oPage, $sId, $aFilterParams = array(), $aExtraParams = array()): iUIBlock
{
$oDisplayBlock = new DisplayBlock($oFilter, 'list', false, $aFilterParams);
return $oDisplayBlock->GetDisplay($oPage, $sId, $aExtraParams);
}
}