search_by_value = $search_by_value; $this ->setDefault(self::DEFAULT_VALUE) ->setSaveType(ZBX_WIDGET_FIELD_TYPE_STR); } public function getSearchByValue(): string { return $this->search_by_value; } 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; } public function setValue($value): self { if ($value === '' || ctype_alnum((string) $value)) { $this->value = $value; } return $this; } }