diff --git a/Models/AttributeHolderTrait.php b/Models/AttributeHolderTrait.php index 323b1c1..a0a4913 100755 --- a/Models/AttributeHolderTrait.php +++ b/Models/AttributeHolderTrait.php @@ -79,6 +79,15 @@ trait AttributeHolderTrait return false; } + /** + * Check if a certain attribute type exists by name + * + * @param string $attrName Attribute name to check + * + * @return bool + * + * @since 1.0.0 + */ public function hasAttributeType(string $attrName) : bool { foreach ($this->attributes as $attribute) { diff --git a/Models/AttributeValue.php b/Models/AttributeValue.php index dd3d12b..9835c11 100755 --- a/Models/AttributeValue.php +++ b/Models/AttributeValue.php @@ -104,9 +104,9 @@ class AttributeValue implements \JsonSerializable /** * Localization * - * @var null|BaseStringL11n + * @var string|BaseStringL11n */ - public ?BaseStringL11n $l11n = null; + public string | BaseStringL11n $l11n = ''; /** * Set l11n diff --git a/Models/PermissionCategory.php b/Models/PermissionCategory.php index d32475a..9c3fd04 100755 --- a/Models/PermissionCategory.php +++ b/Models/PermissionCategory.php @@ -17,7 +17,7 @@ namespace Modules\Attribute\Models; use phpOMS\Stdlib\Base\Enum; /** - * Permision state enum. + * Permission category enum. * * @package Modules\Attribute\Models * @license OMS License 2.0 diff --git a/Theme/Backend/Components/attributes.tpl.php b/Theme/Backend/Components/attributes.tpl.php index b5b87eb..d80cae8 100644 --- a/Theme/Backend/Components/attributes.tpl.php +++ b/Theme/Backend/Components/attributes.tpl.php @@ -33,7 +33,7 @@ $l11n = $this->data['defaultlocalization'] ?? new NullLocalization(); data-add-tpl="#attributeTable tbody .oms-add-tpl-attribute">