mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 10:38:45 +02:00
N°2847 - Refactor some early choices
- TWIG: Change calls to object methods from simple notation (eg. oObject.Id) to complete notation (eg. oObject.GetId()) to avoid confusion with use of arrays and variables (eg. aObject.sId) - UIBlock: $sId should not be first parameter as most of the time it can be ignored and generated by the system - NewsroomMenu: Rename method for something more less ambiguous - Html: Embed content in <div /> so we can easily find all such HTML fragments in the UI
This commit is contained in:
@@ -35,7 +35,6 @@ class Html extends UIBlock
|
||||
// Overloaded constants
|
||||
const BLOCK_CODE = 'ibo-html';
|
||||
const HTML_TEMPLATE_REL_PATH = 'components/html/layout';
|
||||
const JS_TEMPLATE_REL_PATH = 'components/html/layout';
|
||||
|
||||
/** @var string $sHtml */
|
||||
protected $sHtml;
|
||||
@@ -44,11 +43,12 @@ class Html extends UIBlock
|
||||
* Html constructor.
|
||||
*
|
||||
* @param string $sHtml
|
||||
* @param string|null $sId
|
||||
*/
|
||||
public function __construct($sHtml = '')
|
||||
public function __construct($sHtml = '', $sId = null)
|
||||
{
|
||||
$this->sHtml = $sHtml;
|
||||
parent::__construct();
|
||||
parent::__construct($sId);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user