setSaveType(ZBX_WIDGET_FIELD_TYPE_STR); $this->setValidationRules(['type' => API_NUMERIC, 'length' => 255]); $this->setDefault(''); } public function getMaxLength() { return strlen((string) $this->max); } public function setPlaceholder($placeholder) { $this->placeholder = $placeholder; return $this; } public function getPlaceholder() { return $this->placeholder; } public function setWidth($width) { $this->width = $width; return $this; } public function getWidth() { return $this->width; } }