- New directory application/widgets/html/ for widgets to render HTML

elements
- All the widgets classes to render HTML elements moved from WidgetLib
to application/widgets/html/
- New directory application/widgets/udf/ for widgets to render UDF
- All the UDF widgets classes moved from WidgetLib to
application/widgets/udf/
- HTMLWidget is now the main class to render HTML widget
- UDFWidget is now the mail class to render UDF
- Removed UDFWidgetTpl
- Added function loadResource to fhc helper
- Changed method widget of WidgetLib (using loadResource)
- Moved UDFWidget method from WidgetLib to UDFLib
- Slimmed down class Widget present in WidgetLib
- Controller system/UDf now uses UDFLib
- View application/views/system/udf.php now uses UDFLib
- Updated udf and html widgets to adapt them to the new libs
This commit is contained in:
Paolo
2017-08-11 18:41:21 +02:00
parent d7bed89869
commit f126bca708
19 changed files with 748 additions and 652 deletions
@@ -0,0 +1,22 @@
<?php
/**
* It exends the Widget class to represent an HTML dropdown
*/
class CheckboxWidget extends HTMLWidget
{
// Name of the property that will be used to store the value attribute of the option tag
const VALUE_FIELD = 'value';
// Name of the property that will be used to store the value between the option tags
const DESCRIPTION_FIELD = 'description';
// Value of value attribute of the checkbox
const CHECKBOX_VALUE = 'true';
/**
*
*/
protected function loadCheckboxView()
{
$this->view('widgets/checkbox', $this->_args);
}
}
+157
View File
@@ -0,0 +1,157 @@
<?php
/**
* It exends the Widget class to represent an HTML dropdown
*/
class DropdownWidget extends HTMLWidget
{
// The name of the element of the data array given to the view
// this element is an array of elements to be place inside the dropdown
const WIDGET_DATA_ELEMENTS_ARRAY_NAME = 'ELEMENTS_ARRAY';
// Name of the property that will be used to store the value attribute of the option tag
const ID_FIELD = 'id';
// Name of the property that will be used to store the value between the option tags
const DESCRIPTION_FIELD = 'description';
// The name of the element of the data array given to the view
// this element is used to tell what element of the dropdown is selected
const SELECTED_ELEMENT = 'selectedElement';
//
const HTML_DEFAULT_VALUE = 'null';
const SIZE = 'size'; //
const MULTIPLE = 'multiple'; //
/**
*
*/
public function __construct($name, $args = array(), $htmlArgs = array())
{
parent::__construct($name, $args, $htmlArgs);
//
if (!isset($this->_args[DropdownWidget::SELECTED_ELEMENT]))
{
$this->_args[DropdownWidget::SELECTED_ELEMENT] = DropdownWidget::HTML_DEFAULT_VALUE;
}
}
/**
*
*/
public function setMultiple()
{
$this->_args[HTMLWidget::HTML_ARG_NAME][DropdownWidget::MULTIPLE] = DropdownWidget::MULTIPLE;
$this->_args[HTMLWidget::HTML_ARG_NAME][HTMLWidget::HTML_NAME] .= '[]';
}
/**
*
*/
public function isMultipleDropdown()
{
$isMultipleDropdown = false;
if (isset($this->_args[HTMLWidget::HTML_ARG_NAME][DropdownWidget::MULTIPLE])
&& $this->_args[HTMLWidget::HTML_ARG_NAME][DropdownWidget::MULTIPLE] == DropdownWidget::MULTIPLE)
{
$isMultipleDropdown = true;
}
return $isMultipleDropdown;
}
/**
* Add the correct select to the model used to load a list of elemets for this dropdown
* @param model $model the model used to load elements
* @param string $idName the name of the field that will used to be the value of the option tag
* @param string $descriptionName the name of the field that will used to be displayed in the dropdown
*/
protected function addSelectToModel($model, $idName, $descriptionName)
{
$model->addSelect(
sprintf(
'%s AS %s, %s AS %s',
$idName,
DropdownWidget::ID_FIELD,
$descriptionName,
DropdownWidget::DESCRIPTION_FIELD
)
);
}
/**
* Set the array used to populate the dropdown
* @param array $elements list used to populate this dropdown
* @param boolean $emptyElement if an empty element must be added at the beginning of the dropdown
* @param string $stdDescription description of the empty element
* @param string $noDataDescription description if no data are found
* @param string $id value of the attribute value of the empty element
*/
protected function setElementsArray(
$elements, $emptyElement = false, $stdDescription = '' , $noDataDescription = 'No data found' , $id = DropdownWidget::HTML_DEFAULT_VALUE
)
{
$tmpElements = array();
if (isError($elements))
{
if (is_object($elements) && isset($elements->retval))
{
show_error($elements->retval);
}
else if (is_string($elements))
{
show_error($elements);
}
else
{
show_error('Generic error occurred');
}
}
else
{
if ($emptyElement === true && $this->isMultipleDropdown() == false)
{
$tmpElements = $this->addElementAtBeginning(
$elements,
$stdDescription,
$noDataDescription,
$id
);
}
else
{
$tmpElements = $elements->retval;
}
$this->_args[DropdownWidget::WIDGET_DATA_ELEMENTS_ARRAY_NAME] = $tmpElements;
}
}
/**
* Adds an element to the beginning of the array
*/
protected function addElementAtBeginning($elements, $stdDescription, $noDataDescription, $id)
{
$element = new stdClass();
$element->{DropdownWidget::ID_FIELD} = $id;
$element->{DropdownWidget::DESCRIPTION_FIELD} = $stdDescription;
if (!hasData($elements))
{
$element->{DropdownWidget::DESCRIPTION_FIELD} = $noDataDescription;
}
array_unshift($elements->retval, $element);
return $elements->retval;
}
/**
* Loads the dropdown view with all the elements to be displayed
*/
protected function loadDropDownView()
{
$this->view('widgets/dropdown', $this->_args);
}
}
+117
View File
@@ -0,0 +1,117 @@
<?php
/**
* Represents a generic HTML element
*/
class HTMLWidget extends Widget
{
// The name of the array present in the data array given to the view that will render this widget
const HTML_ARG_NAME = 'HTML';
const HTML_DEFAULT_VALUE = ''; // Default value of the html element
const HTML_NAME = 'name'; // HTML name attribute
const HTML_ID = 'id'; // HTML id attribute
//
const EXTERNAL_BLOCK = 'externalBlock'; //
const EXTERNAL_START_BLOCK_HTML_TAG = '<div>'; //
const EXTERNAL_END_BLOCK_HTML_TAG = '</div>'; //
//
const LABEL = 'title';
const REGEX = 'regex';
const TITLE = 'description';
const REQUIRED = 'udf-required';
const MAX_VALUE = 'max-value';
const MIN_VALUE = 'min-value';
const MAX_LENGTH = 'max-length';
const MIN_LENGTH = 'min-length';
const PLACEHOLDER = 'placeholder';
/**
* It gets also the htmlArgs array as parameter, it will be used to set the HTML properties
*/
public function __construct($name, $args = array(), $htmlArgs = array())
{
parent::__construct($name, $args);
// Initialising HTML properties
$this->_setHtmlProperties($htmlArgs);
// Loads helper message to manage returning messages
$this->load->helper('message');
}
/**
* Initialising html properties, such as the id and name attributes of the HTML element
*/
private function _setHtmlProperties($htmlArgs)
{
// If $htmlArgs wasn't already stored in $this->_args
if (!isset($this->_args[HTMLWidget::HTML_ARG_NAME]))
{
$this->_args[HTMLWidget::HTML_ARG_NAME] = array();
// Avoids that elements in a HTML page have the same name or id
$randomIdentifier = uniqid(rand(0, 1000));
$this->_args[HTMLWidget::HTML_ARG_NAME][HTMLWidget::HTML_ID] = $randomIdentifier;
$this->_args[HTMLWidget::HTML_ARG_NAME][HTMLWidget::HTML_NAME] = $randomIdentifier;
foreach($htmlArgs as $argName => $argValue)
{
$this->_args[HTMLWidget::HTML_ARG_NAME][$argName] = $argValue;
}
}
}
/**
*
*/
public static function printAttribute($htmlArgs, $attribute, $isValuePresent = true)
{
if ($attribute != null)
{
if (isset($htmlArgs[$attribute]))
{
if ($isValuePresent === true)
{
$value = $htmlArgs[$attribute];
if (is_bool($value))
{
$value = $value ? 'true' : 'false';
}
echo sprintf('%s="%s"', $attribute, $value);
}
else
{
echo $attribute;
}
}
}
}
/**
*
*/
public static function printStartBlock($htmlArgs)
{
if (isset($htmlArgs[HTMLWidget::EXTERNAL_BLOCK])
&& $htmlArgs[HTMLWidget::EXTERNAL_BLOCK] === true)
{
echo HTMLWidget::EXTERNAL_START_BLOCK_HTML_TAG;
}
}
/**
*
*/
public static function printEndBlock($htmlArgs)
{
if (isset($htmlArgs[HTMLWidget::EXTERNAL_BLOCK])
&& $htmlArgs[HTMLWidget::EXTERNAL_BLOCK] === true)
{
echo HTMLWidget::EXTERNAL_END_BLOCK_HTML_TAG;
}
}
}
@@ -0,0 +1,27 @@
<?php
/**
* It exends the Widget class to represent an HTML textarea
*/
class TextareaWidget extends HTMLWidget
{
const TEXT = 'text'; //
const ROWS = 'rows'; //
const COLS = 'cols'; //
/**
*
*/
protected function setText($text)
{
$this->_args[TextareaWidget::TEXT] = $text;
}
/**
*
*/
protected function loadTextareaView()
{
$this->view('widgets/textarea', $this->_args);
}
}
@@ -0,0 +1,26 @@
<?php
/**
* It exends the Widget class to represent an HTML textarea
*/
class TextfieldWidget extends HTMLWidget
{
const VALUE = 'text'; //
const SIZE = 'size'; //
/**
*
*/
protected function setValue($value)
{
$this->_args[TextfieldWidget::VALUE] = $value;
}
/**
*
*/
protected function loadTextfieldView()
{
$this->view('widgets/textfield', $this->_args);
}
}
@@ -0,0 +1,17 @@
<?php
/**
*
*/
class CheckboxWidgetUDF extends CheckboxWidget
{
/**
*
*/
public function render()
{
$this->loadCheckboxView();
echo $this->content();
}
}
@@ -0,0 +1,58 @@
<?php
/**
*
*/
class DropdownWidgetUDF extends DropdownWidget
{
/**
*
*/
public function render($parameters)
{
$tmpElements = array();
//
foreach($parameters as $parameter)
{
//
if ((is_array($parameter) && count($parameter) == 2)
|| (is_string($parameter) || is_numeric($parameter))
|| (is_object($parameter) && isset($parameter->{PARENT::ID_FIELD}) && isset($parameter->{PARENT::DESCRIPTION_FIELD})))
{
$element = new stdClass(); //
//
if (is_array($parameter) && count($parameter) == 2)
{
$element->{PARENT::ID_FIELD} = $parameter[0]; //
$element->{PARENT::DESCRIPTION_FIELD} = $parameter[1]; //
}
//
else if (is_string($parameter) || is_numeric($parameter))
{
$element->{PARENT::ID_FIELD} = $parameter; //
$element->{PARENT::DESCRIPTION_FIELD} = $parameter; //
}
//
else if (is_object($parameter) && isset($parameter->{PARENT::ID_FIELD}) && isset($parameter->{PARENT::DESCRIPTION_FIELD}))
{
$element->{PARENT::ID_FIELD} = $parameter->{PARENT::ID_FIELD}; //
$element->{PARENT::DESCRIPTION_FIELD} = $parameter->{PARENT::DESCRIPTION_FIELD}; //
}
array_push($tmpElements, $element); //
}
}
$this->setElementsArray(
success($tmpElements),
true,
$this->_args[HTMLWidget::HTML_ARG_NAME][HTMLWidget::PLACEHOLDER],
'No data found for this UDF'
);
$this->loadDropDownView();
echo $this->content();
}
}
@@ -0,0 +1,26 @@
<?php
/**
*
*/
class TextareaWidgetUDF extends TextareaWidget
{
/**
*
*/
public function render($parameters)
{
if ($parameters != null)
{
$this->setText($parameters);
}
else
{
$this->setText('');
}
$this->loadTextareaView();
echo $this->content();
}
}
@@ -0,0 +1,26 @@
<?php
/**
*
*/
class TextfieldWidgetUDF extends TextfieldWidget
{
/**
*
*/
public function render($parameters)
{
if ($parameters != null)
{
$this->setValue($parameters);
}
else
{
$this->setValue('');
}
$this->loadTextfieldView();
echo $this->content();
}
}
@@ -3,11 +3,10 @@
/**
*
*/
class UDFWidget extends UDFWidgetTpl
class UDFWidget extends HTMLWidget
{
const NAME = 'name';
const TYPE = 'type';
const REQUIRED = 'udf-required';
const VALIDATION = 'validation';
const LIST_VALUES = 'listValues';
const REGEX_LANGUAGE = 'js';
@@ -16,12 +15,12 @@ class UDFWidget extends UDFWidgetTpl
public function display($widgetData)
{
$schema = $widgetData[UDFWidgetTpl::SCHEMA_ARG_NAME];
$table = $widgetData[UDFWidgetTpl::TABLE_ARG_NAME];
$schema = $widgetData[UDFLib::SCHEMA_ARG_NAME];
$table = $widgetData[UDFLib::TABLE_ARG_NAME];
if (isset($widgetData[UDFWidgetTpl::FIELD_ARG_NAME]))
if (isset($widgetData[UDFLib::FIELD_ARG_NAME]))
{
$field = $widgetData[UDFWidgetTpl::FIELD_ARG_NAME];
$field = $widgetData[UDFLib::FIELD_ARG_NAME];
}
$udfResults = $this->_loadUDF($schema, $table);
@@ -105,8 +104,8 @@ class UDFWidget extends UDFWidgetTpl
*/
private function _setNameAndId($jsonSchema)
{
$this->_args[Widget::HTML_ARG_NAME][Widget::HTML_ID] = $jsonSchema->{UDFWidget::NAME};
$this->_args[Widget::HTML_ARG_NAME][Widget::HTML_NAME] = $jsonSchema->{UDFWidget::NAME};
$this->_args[HTMLWidget::HTML_ARG_NAME][HTMLWidget::HTML_ID] = $jsonSchema->{UDFWidget::NAME};
$this->_args[HTMLWidget::HTML_ARG_NAME][HTMLWidget::HTML_NAME] = $jsonSchema->{UDFWidget::NAME};
}
/**
@@ -210,10 +209,10 @@ class UDFWidget extends UDFWidgetTpl
*/
private function _renderDropdown($jsonSchema, $multiple = false)
{
if (isset($this->_args[UDFWidgetTpl::UDFS_ARG_NAME])
&& isset($this->_args[UDFWidgetTpl::UDFS_ARG_NAME][$jsonSchema->{UDFWidget::NAME}]))
if (isset($this->_args[UDFLib::UDFS_ARG_NAME])
&& isset($this->_args[UDFLib::UDFS_ARG_NAME][$jsonSchema->{UDFWidget::NAME}]))
{
$this->_args[DropdownWidget::SELECTED_ELEMENT] = $this->_args[UDFWidgetTpl::UDFS_ARG_NAME][$jsonSchema->{UDFWidget::NAME}];
$this->_args[DropdownWidget::SELECTED_ELEMENT] = $this->_args[UDFLib::UDFS_ARG_NAME][$jsonSchema->{UDFWidget::NAME}];
}
else
{
@@ -254,10 +253,10 @@ class UDFWidget extends UDFWidgetTpl
$textareaUDF = new TextareaWidgetUDF($this->_name, $this->_args);
$text = null;
if (isset($this->_args[UDFWidgetTpl::UDFS_ARG_NAME])
&& isset($this->_args[UDFWidgetTpl::UDFS_ARG_NAME][$jsonSchema->{UDFWidget::NAME}]))
if (isset($this->_args[UDFLib::UDFS_ARG_NAME])
&& isset($this->_args[UDFLib::UDFS_ARG_NAME][$jsonSchema->{UDFWidget::NAME}]))
{
$text = $this->_args[UDFWidgetTpl::UDFS_ARG_NAME][$jsonSchema->{UDFWidget::NAME}];
$text = $this->_args[UDFLib::UDFS_ARG_NAME][$jsonSchema->{UDFWidget::NAME}];
}
$textareaUDF->render($text);
@@ -271,10 +270,10 @@ class UDFWidget extends UDFWidgetTpl
$textareaUDF = new TextfieldWidgetUDF($this->_name, $this->_args);
$text = null;
if (isset($this->_args[UDFWidgetTpl::UDFS_ARG_NAME])
&& isset($this->_args[UDFWidgetTpl::UDFS_ARG_NAME][$jsonSchema->{UDFWidget::NAME}]))
if (isset($this->_args[UDFLib::UDFS_ARG_NAME])
&& isset($this->_args[UDFLib::UDFS_ARG_NAME][$jsonSchema->{UDFWidget::NAME}]))
{
$text = $this->_args[UDFWidgetTpl::UDFS_ARG_NAME][$jsonSchema->{UDFWidget::NAME}];
$text = $this->_args[UDFLib::UDFS_ARG_NAME][$jsonSchema->{UDFWidget::NAME}];
}
$textareaUDF->render($text);
@@ -285,14 +284,14 @@ class UDFWidget extends UDFWidgetTpl
*/
private function _renderCheckbox($jsonSchema)
{
if (isset($this->_args[UDFWidgetTpl::UDFS_ARG_NAME])
&& isset($this->_args[UDFWidgetTpl::UDFS_ARG_NAME][$jsonSchema->{UDFWidget::NAME}]))
if (isset($this->_args[UDFLib::UDFS_ARG_NAME])
&& isset($this->_args[UDFLib::UDFS_ARG_NAME][$jsonSchema->{UDFWidget::NAME}]))
{
$this->_args[CheckboxWidget::VALUE_FIELD] = $this->_args[UDFWidgetTpl::UDFS_ARG_NAME][$jsonSchema->{UDFWidget::NAME}];
$this->_args[CheckboxWidget::VALUE_FIELD] = $this->_args[UDFLib::UDFS_ARG_NAME][$jsonSchema->{UDFWidget::NAME}];
}
else
{
$this->_args[CheckboxWidget::VALUE_FIELD] = Widget::HTML_DEFAULT_VALUE;
$this->_args[CheckboxWidget::VALUE_FIELD] = HTMLWidget::HTML_DEFAULT_VALUE;
}
$checkboxWidgetUDF = new CheckboxWidgetUDF($this->_name, $this->_args);
@@ -306,73 +305,73 @@ class UDFWidget extends UDFWidgetTpl
private function _setAttributesWithPhrases($jsonSchema)
{
// Description, title and placeholder
if (isset($jsonSchema->{UDFWidgetTpl::LABEL})
|| isset($jsonSchema->{UDFWidgetTpl::TITLE})
|| isset($jsonSchema->{UDFWidgetTpl::PLACEHOLDER}))
if (isset($jsonSchema->{UDFLib::LABEL})
|| isset($jsonSchema->{UDFLib::TITLE})
|| isset($jsonSchema->{UDFLib::PLACEHOLDER}))
{
//
$this->_ci->load->library('PhrasesLib');
//
if (isset($jsonSchema->{UDFWidgetTpl::LABEL}))
if (isset($jsonSchema->{UDFLib::LABEL}))
{
$tmpResult = $this->_ci->phraseslib->getPhrases(
UDFWidget::PHRASES_APP_NAME,
DEFAULT_LEHREINHEIT_SPRACHE,
$jsonSchema->{UDFWidgetTpl::LABEL},
$jsonSchema->{UDFLib::LABEL},
null,
null,
'no'
);
if (hasData($tmpResult))
{
$this->_args[Widget::HTML_ARG_NAME][UDFWidgetTpl::LABEL] = $tmpResult->retval[0]->text;
$this->_args[HTMLWidget::HTML_ARG_NAME][UDFLib::LABEL] = $tmpResult->retval[0]->text;
}
else
{
$this->_args[Widget::HTML_ARG_NAME][UDFWidgetTpl::LABEL] = null;
$this->_args[HTMLWidget::HTML_ARG_NAME][UDFLib::LABEL] = null;
}
}
//
if (isset($jsonSchema->{UDFWidgetTpl::TITLE}))
if (isset($jsonSchema->{UDFLib::TITLE}))
{
$tmpResult = $this->_ci->phraseslib->getPhrases(
UDFWidget::PHRASES_APP_NAME,
DEFAULT_LEHREINHEIT_SPRACHE,
$jsonSchema->{UDFWidgetTpl::TITLE},
$jsonSchema->{UDFLib::TITLE},
null,
null,
'no'
);
if (hasData($tmpResult))
{
$this->_args[Widget::HTML_ARG_NAME][UDFWidgetTpl::TITLE] = $tmpResult->retval[0]->text;
$this->_args[HTMLWidget::HTML_ARG_NAME][UDFLib::TITLE] = $tmpResult->retval[0]->text;
}
else
{
$this->_args[Widget::HTML_ARG_NAME][UDFWidgetTpl::TITLE] = null;
$this->_args[HTMLWidget::HTML_ARG_NAME][UDFLib::TITLE] = null;
}
}
//
if (isset($jsonSchema->{UDFWidgetTpl::PLACEHOLDER}))
if (isset($jsonSchema->{UDFLib::PLACEHOLDER}))
{
$tmpResult = $this->_ci->phraseslib->getPhrases(
UDFWidget::PHRASES_APP_NAME,
DEFAULT_LEHREINHEIT_SPRACHE,
$jsonSchema->{UDFWidgetTpl::PLACEHOLDER},
$jsonSchema->{UDFLib::PLACEHOLDER},
null,
null,
'no'
);
if (hasData($tmpResult))
{
$this->_args[Widget::HTML_ARG_NAME][UDFWidgetTpl::PLACEHOLDER] = $tmpResult->retval[0]->text;
$this->_args[HTMLWidget::HTML_ARG_NAME][UDFLib::PLACEHOLDER] = $tmpResult->retval[0]->text;
}
else
{
$this->_args[Widget::HTML_ARG_NAME][UDFWidgetTpl::PLACEHOLDER] = null;
$this->_args[HTMLWidget::HTML_ARG_NAME][UDFLib::PLACEHOLDER] = null;
}
}
}
@@ -384,38 +383,38 @@ class UDFWidget extends UDFWidgetTpl
private function _setValidationAttributes($jsonSchema)
{
// Validation
$this->_args[Widget::HTML_ARG_NAME][UDFWidget::REQUIRED] = null;
$this->_args[Widget::HTML_ARG_NAME][UDFWidgetTpl::REGEX] = null;
$this->_args[Widget::HTML_ARG_NAME][UDFWidgetTpl::MAX_VALUE] = null;
$this->_args[Widget::HTML_ARG_NAME][UDFWidgetTpl::MIN_VALUE] = null;
$this->_args[HTMLWidget::HTML_ARG_NAME][UDFWidget::REQUIRED] = null;
$this->_args[HTMLWidget::HTML_ARG_NAME][UDFLib::REGEX] = null;
$this->_args[HTMLWidget::HTML_ARG_NAME][UDFLib::MAX_VALUE] = null;
$this->_args[HTMLWidget::HTML_ARG_NAME][UDFLib::MIN_VALUE] = null;
if (isset($jsonSchema->validation))
{
if (isset($jsonSchema->{UDFWidget::VALIDATION}->{UDFWidgetTpl::REGEX})
&& is_array($jsonSchema->{UDFWidget::VALIDATION}->{UDFWidgetTpl::REGEX}))
if (isset($jsonSchema->{UDFWidget::VALIDATION}->{UDFLib::REGEX})
&& is_array($jsonSchema->{UDFWidget::VALIDATION}->{UDFLib::REGEX}))
{
foreach($jsonSchema->{UDFWidget::VALIDATION}->{UDFWidgetTpl::REGEX} as $regex)
foreach($jsonSchema->{UDFWidget::VALIDATION}->{UDFLib::REGEX} as $regex)
{
if ($regex->language === UDFWidget::REGEX_LANGUAGE)
{
$this->_args[Widget::HTML_ARG_NAME][UDFWidgetTpl::REGEX] = $regex->expression;
$this->_args[HTMLWidget::HTML_ARG_NAME][UDFLib::REGEX] = $regex->expression;
}
}
}
if (isset($jsonSchema->{UDFWidget::VALIDATION}->{UDFWidgetTpl::REQUIRED}))
if (isset($jsonSchema->{UDFWidget::VALIDATION}->{UDFLib::REQUIRED}))
{
$this->_args[Widget::HTML_ARG_NAME][UDFWidget::REQUIRED] = $jsonSchema->{UDFWidget::VALIDATION}->{UDFWidgetTpl::REQUIRED};
$this->_args[HTMLWidget::HTML_ARG_NAME][UDFWidget::REQUIRED] = $jsonSchema->{UDFWidget::VALIDATION}->{UDFLib::REQUIRED};
}
if (isset($jsonSchema->{UDFWidget::VALIDATION}->{UDFWidgetTpl::MAX_VALUE}))
if (isset($jsonSchema->{UDFWidget::VALIDATION}->{UDFLib::MAX_VALUE}))
{
$this->_args[Widget::HTML_ARG_NAME][UDFWidgetTpl::MAX_VALUE] = $jsonSchema->{UDFWidget::VALIDATION}->{UDFWidgetTpl::MAX_VALUE};
$this->_args[HTMLWidget::HTML_ARG_NAME][UDFLib::MAX_VALUE] = $jsonSchema->{UDFWidget::VALIDATION}->{UDFLib::MAX_VALUE};
}
if (isset($jsonSchema->{UDFWidget::VALIDATION}->{UDFWidgetTpl::MIN_VALUE}))
if (isset($jsonSchema->{UDFWidget::VALIDATION}->{UDFLib::MIN_VALUE}))
{
$this->_args[Widget::HTML_ARG_NAME][UDFWidgetTpl::MIN_VALUE] = $jsonSchema->{UDFWidget::VALIDATION}->{UDFWidgetTpl::MIN_VALUE};
$this->_args[HTMLWidget::HTML_ARG_NAME][UDFLib::MIN_VALUE] = $jsonSchema->{UDFWidget::VALIDATION}->{UDFLib::MIN_VALUE};
}
}
}