Documentation

This commit is contained in:
Eric Espie
2026-01-27 16:37:17 +01:00
parent f3fddfe54e
commit 3092e9d5d4
31 changed files with 185 additions and 37 deletions

View File

@@ -22,16 +22,29 @@ use utils;
/**
* A block to choose an attribute from a given class.
*
* @package Combodo\iTop\Forms\Block\DataModel
* @api
* @package FormBlock
* @since 3.3.0
*/
class AttributeChoiceFormBlock extends ChoiceFormBlock
{
// inputs
/**
* Class input reflecting the selected class
* @api
*/
public const INPUT_CLASS_NAME = 'class';
/**
* String input for the category of attributes to select from
* @api
*/
public const INPUT_CATEGORY = 'category';
// outputs
/**
* String output of the selected attribute
* @api
*/
public const OUTPUT_ATTRIBUTE = 'attribute';
/** @inheritdoc */
@@ -61,7 +74,7 @@ class AttributeChoiceFormBlock extends ChoiceFormBlock
/**
* @inheritdoc
*
* @throws ServiceLocationException
* @throws ServiceLocatorException
* @throws FormBlockException
* @throws RegisterException
*/

View File

@@ -15,12 +15,17 @@ use Combodo\iTop\Forms\Register\OptionsRegister;
/**
* A block to choose an attribute type.
*
* @package Combodo\iTop\Forms\Block\DataModel
* @api
* @package FormBlock
* @since 3.3.0
*/
class AttributeTypeChoiceFormBlock extends ChoiceFormBlock
{
// outputs
/**
* String output of the selected attribute type
* @api
*/
public const OUTPUT_ATTRIBUTE_TYPE = 'output_type';
/** @inheritdoc */
@@ -29,10 +34,13 @@ class AttributeTypeChoiceFormBlock extends ChoiceFormBlock
parent::RegisterOptions($oOptionsRegister);
$oOptionsRegister->SetOption('placeholder', 'Select a type...');
$oOptionsRegister->SetOption('choices', [
'numeric' => 'numeric',
'group_by' => 'group_by',
'date' => 'date',
'enum' => 'enum',
'numeric' => 'numeric',
'groupable' => 'groupable',
'date' => 'date',
'enum' => 'enum',
'link' => 'link',
'string' => 'string',
'all' => 'all',
]);
}

View File

@@ -19,13 +19,22 @@ use Exception;
/**
* A block to choose some values from attribute of a given class.
*
* @package Combodo\iTop\Forms\Block\DataModel
* @api
* @package FormBlock
* @since 3.3.0
*/
class AttributeValueChoiceFormBlock extends ChoiceFormBlock
{
// inputs
/**
* Class input reflecting the selected class
* @api
*/
public const INPUT_CLASS_NAME = 'class';
/**
* String input reflecting the selected attribute
* @api
*/
public const INPUT_ATTRIBUTE = 'attribute';
/** @inheritdoc */

View File

@@ -17,11 +17,16 @@ use Dict;
/**
* A block to manage an aggregation function list
*
* @package Combodo\iTop\Forms\Block\DataModel\Dashlet
* @api
* @package FormBlock
* @since 3.3.0
*/
class AggregateFunctionFormBlock extends ChoiceFormBlock
{
/**
* Class input reflecting the selected class
* @api
*/
public const INPUT_CLASS_NAME = 'class';
/** @inheritdoc */

View File

@@ -17,7 +17,8 @@ use Exception;
/**
* A block to manage an attribute of a data model class for grouping purpose
*
* @package Combodo\iTop\Forms\Block\DataModel\Dashlet
* @api
* @package FormBlock
* @since 3.3.0
*/
class ClassAttributeGroupByFormBlock extends AttributeChoiceFormBlock

View File

@@ -9,6 +9,13 @@ namespace Combodo\iTop\Forms\Block\DataModel;
use Combodo\iTop\Forms\Block\Base\TextFormBlock;
/**
* A block to input text matching dictionary entry
*
* @api
* @package FormBlock
* @since 3.3.0
*/
class LabelFormBlock extends TextFormBlock
{
}

View File

@@ -18,12 +18,17 @@ use Combodo\iTop\Forms\Register\OptionsRegister;
* A block to manage OQL expression input.
* This block exposes an output providing the selected class from the OQL.
*
* @package Combodo\iTop\Forms\Block\DataModel
* @api
* @package FormBlock
* @since 3.3.0
*/
class OqlFormBlock extends TextAreaFormBlock
{
// outputs
/**
* Class output reflecting the selected class
* @api
*/
public const OUTPUT_SELECTED_CLASS = 'selected_class';
/** @inheritdoc */