mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-25 11:38:44 +02:00
Feature/modals - generic modal API (#373)
Default modal JS Implementation: Add title option Add buttons option Change template cloning Confirmation Modal: Add implementation Do not show again functionality Web Page: Add blocks array with twig loop insertion
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
namespace Combodo\iTop\Application\UI\Base\Component\Template;
|
||||
|
||||
use Combodo\iTop\Application\UI\Base\AbstractUIBlockFactory;
|
||||
use Combodo\iTop\Application\UI\Base\Layout\UIContentBlock;
|
||||
|
||||
/**
|
||||
* Class TemplateUIBlockFactory
|
||||
@@ -47,4 +48,17 @@ class TemplateUIBlockFactory extends AbstractUIBlockFactory
|
||||
{
|
||||
return new Template($sId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Make a Template component with a block inside.
|
||||
*
|
||||
* @return \Combodo\iTop\Application\UI\Base\Component\Template\Template
|
||||
*/
|
||||
public static function MakeForBlock(string $sId, UIContentBlock $oContentBlock)
|
||||
{
|
||||
$oBlock = TemplateUIBlockFactory::MakeStandard($sId);
|
||||
$oBlock->AddSubBlock($oContentBlock);
|
||||
|
||||
return $oBlock;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user