mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-29 05:28:44 +02:00
Add ChoiceImageFormBlock
This commit is contained in:
36
sources/Forms/Block/Base/ChoiceImageFormBlock.php
Normal file
36
sources/Forms/Block/Base/ChoiceImageFormBlock.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* @copyright Copyright (C) 2010-2025 Combodo SARL
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
*/
|
||||
|
||||
namespace Combodo\iTop\Forms\Block\Base;
|
||||
|
||||
use Combodo\iTop\Forms\Register\OptionsRegister;
|
||||
use utils;
|
||||
|
||||
/**
|
||||
* A block to manage a list of images.
|
||||
* This block expose two outputs: the label and the value of the selected choice.
|
||||
*
|
||||
* @package Combodo\iTop\Forms\Block\Base
|
||||
* @since 3.3.0
|
||||
*/
|
||||
class ChoiceImageFormBlock extends ChoiceFormBlock
|
||||
{
|
||||
protected function RegisterOptions(OptionsRegister $oOptionsRegister): void
|
||||
{
|
||||
parent::RegisterOptions($oOptionsRegister);
|
||||
|
||||
$oOptionsRegister->SetOption('plugins', [
|
||||
[
|
||||
'name' => 'image_renderer',
|
||||
'options' => [
|
||||
'images_resource_path' => utils::GetAbsoluteUrlAppRoot().'/env-production/',
|
||||
],
|
||||
],
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user