isProtected()) return false; $input = $this->fromString($input); $value = is_null($this->local) ? $this->default : $this->local; if ($value == $input) return false; foreach ($input as $item) { if ($this->pattern && !preg_match($this->pattern, $item)) { $this->error = true; $this->input = $input; return false; } } $this->local = $input; return true; } /** @inheritdoc */ public function html(\admin_plugin_config $plugin, $echo = false) { $disable = ''; if ($this->isProtected()) { $value = $this->protected; $disable = 'disabled="disabled"'; } elseif ($echo && $this->error) { $value = $this->input; } else { $value = is_null($this->local) ? $this->default : $this->local; } $key = htmlspecialchars($this->key); $value = htmlspecialchars($this->fromArray($value)); $label = ''; $input = ''; return [$label, $input]; } }