setDefault(self::DEFAULT_VALUE) ->setSaveType(ZBX_WIDGET_FIELD_TYPE_STR); } public function setFlags(int $flags): self { parent::setFlags($flags); if (($flags & self::FLAG_NOT_EMPTY) !== 0) { $strict_validation_rules = $this->getValidationRules(); self::setValidationRuleFlag($strict_validation_rules, API_NOT_EMPTY); $this->setStrictValidationRules($strict_validation_rules); } else { $this->setStrictValidationRules(); } return $this; } }