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:
bdalsass
2022-12-06 10:18:59 +01:00
committed by GitHub
parent 98a53a46f0
commit dbe7fae82e
29 changed files with 322 additions and 345 deletions

View File

@@ -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;
}
}