mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 18:48:51 +02:00
UIBlock: Add MakeRaw to the HTML factory
This commit is contained in:
@@ -26,6 +26,26 @@ namespace Combodo\iTop\Application\UI\Base\Component\Html;
|
||||
*/
|
||||
class HtmlFactory
|
||||
{
|
||||
/**
|
||||
* Make an HTML block without any extra markup.
|
||||
* The only purpose of this method is to enable devs to use only factories without instantiating base class directly.
|
||||
*
|
||||
* @param string $sContent
|
||||
*
|
||||
* @return \Combodo\iTop\Application\UI\Base\Component\Html\Html
|
||||
*/
|
||||
public static function MakeRaw(string $sContent): Html
|
||||
{
|
||||
return new Html($sContent);
|
||||
}
|
||||
|
||||
/**
|
||||
* Make an HTML paragraph with $sContent inside
|
||||
*
|
||||
* @param string $sContent
|
||||
*
|
||||
* @return \Combodo\iTop\Application\UI\Base\Component\Html\Html
|
||||
*/
|
||||
public static function MakeParagraph(string $sContent): Html
|
||||
{
|
||||
return new Html('<p>'.$sContent.'</p>');
|
||||
|
||||
Reference in New Issue
Block a user