mirror of
https://github.com/Karaka-Management/oms-Attribute.git
synced 2026-02-15 08:58:42 +00:00
continue implementations
This commit is contained in:
parent
b66a28e782
commit
8fae14a103
|
|
@ -35,6 +35,11 @@
|
||||||
"type": "TINYINT(1)",
|
"type": "TINYINT(1)",
|
||||||
"null": false
|
"null": false
|
||||||
},
|
},
|
||||||
|
"attribute_attr_type_repeatable": {
|
||||||
|
"name": "attribute_attr_type_repeatable",
|
||||||
|
"type": "TINYINT(1)",
|
||||||
|
"null": false
|
||||||
|
},
|
||||||
"attribute_attr_type_required": {
|
"attribute_attr_type_required": {
|
||||||
"description": "Every element must have this attribute type if set to true.",
|
"description": "Every element must have this attribute type if set to true.",
|
||||||
"name": "attribute_attr_type_required",
|
"name": "attribute_attr_type_required",
|
||||||
|
|
|
||||||
|
|
@ -154,6 +154,7 @@ trait ApiAttributeTraitController
|
||||||
$attrType = new AttributeType($request->getDataString('name') ?? '');
|
$attrType = new AttributeType($request->getDataString('name') ?? '');
|
||||||
$attrType->datatype = $request->getDataInt('datatype') ?? 0;
|
$attrType->datatype = $request->getDataInt('datatype') ?? 0;
|
||||||
$attrType->custom = $request->getDataBool('custom') ?? false;
|
$attrType->custom = $request->getDataBool('custom') ?? false;
|
||||||
|
$attrType->repeatable = $request->getDataBool('repeatable') ?? false;
|
||||||
$attrType->isRequired = $request->getDataBool('is_required') ?? false;
|
$attrType->isRequired = $request->getDataBool('is_required') ?? false;
|
||||||
$attrType->validationPattern = $request->getDataString('validation_pattern') ?? '';
|
$attrType->validationPattern = $request->getDataString('validation_pattern') ?? '';
|
||||||
$attrType->setL11n($request->getDataString('title') ?? '', $request->getDataString('language') ?? ISO639x1Enum::_EN);
|
$attrType->setL11n($request->getDataString('title') ?? '', $request->getDataString('language') ?? ISO639x1Enum::_EN);
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,8 @@ class AttributeType implements \JsonSerializable
|
||||||
|
|
||||||
public bool $isRequired = false;
|
public bool $isRequired = false;
|
||||||
|
|
||||||
|
public bool $repeatable = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Datatype of the attribute
|
* Datatype of the attribute
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,7 @@ final class AttributeValueMapper extends DataMapperFactory
|
||||||
'mapper' => AttributeValueL11nMapper::class,
|
'mapper' => AttributeValueL11nMapper::class,
|
||||||
'table' => 'attribute_attr_value_l11n',
|
'table' => 'attribute_attr_value_l11n',
|
||||||
'self' => 'attribute_attr_value_l11n_value',
|
'self' => 'attribute_attr_value_l11n_value',
|
||||||
|
'column' => 'content',
|
||||||
'external' => null,
|
'external' => null,
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -13,16 +13,12 @@
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
use phpOMS\Localization\ISO639Enum;
|
use phpOMS\Localization\ISO639Enum;
|
||||||
use phpOMS\Localization\NullLocalization;
|
|
||||||
use phpOMS\Uri\UriFactory;
|
use phpOMS\Uri\UriFactory;
|
||||||
|
|
||||||
$attribute = $this->attributes;
|
$attribute = $this->attributes;
|
||||||
$languages = ISO639Enum::getConstants();
|
$languages = ISO639Enum::getConstants();
|
||||||
$types = $this->attributeTypes;
|
$types = $this->attributeTypes;
|
||||||
$units = $this->units;
|
$units = $this->units;
|
||||||
|
|
||||||
/** @var \phpOMS\Localization\Localization $l11n */
|
|
||||||
$l11n = $this->data['defaultlocalization'] ?? new NullLocalization();
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="col-xs-12 col-md-6">
|
<div class="col-xs-12 col-md-6">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user