default = error_reporting(); if ($local == 0) { $this->local = $this->default; } } /** @inheritdoc */ protected function cleanValue($value) { if ($value === null) return null; if (is_array($value)) $value = array_sum($value); return (int)$value; } /** @inheritdoc */ public function isDefault() { return parent::isDefault() || (error_reporting() == $this->local); } /** @inheritdoc */ public function html(\admin_plugin_config $plugin, $echo = false) { if ($echo) { $current = $this->input; } else { $current = $this->local; } $label = ''; $input = ''; foreach (Event::CORE_ERRORS as $val => $info) { $checked = ''; if ($current & $val) { $checked = 'checked="checked"'; } $class = 'selection'; if (error_reporting() & $val) { if ($current & $val) { $class .= ' selectiondefault'; } } else { if (!($current & $val)) { $class .= ' selectiondefault'; } } $inputId = 'config___' . $this->key . '_' . $val; $input .= '