The default, transformed by prepare_value() and the theme overrides.
965754
def themed_default(self, cls, name, theme_overrides):
        ''' 

        '''
        overrides = theme_overrides
        if overrides is None or name not in overrides:
            overrides = cls._overridden_defaults()

        if name in overrides:
            default = self._copy_default(overrides[name])
        else:
            default = self._raw_default()
        return self.prepare_value(cls, name, default)
1022804
def set_default(self, key, value):
        
        k = self._real_key(key.lower())
        self._defaults[k] = value
356758
public function applyDefaultValues()
    {
        $this->is_translation = false;
        $this->is_rotation = false;
        $this->is_acyclic = false;
        $this->is_cyclic = false;
        $this->is_composite = false;
        $this->is_multiple = false;
        $this->importance = 0;
        $this->version = 0;
    }
880403
def set_default(self_,param_name,value):
        
        cls = self_.cls
        setattr(cls,param_name,value)
374496
private function setDefaultValueInternal()
    {
        $defaultValue = $this->getDefaultValue();
        if ($defaultValue == 'now') {
            $defaultValue = new DateTimeObject('now');
        }
        $this->setValue($defaultValue);
    }
956358
function set_data($default_values) {
        if (!is_object($default_values)) {
            // we need object for file_prepare_standard_editor
            $default_values = (object)$default_values;
        }
        $editoroptions = $this->_customdata['editoroptions'];
        $default_values = file_prepare_standard_editor($default_values, 'summary', $editoroptions,
                $editoroptions['context'], 'course', 'section', $default_values->id);
        if (strval($default_values->name) === '') {
            $default_values->name = false;
        }
        parent::set_data($default_values);
    }
206841
protected function assignDefaultValues()
	{
		foreach ($this->defaultValues as $key => $value) {
			$this->model[$key] = $value;
		}

        return true;
	}
896232
protected function _setDefault()
    {
        if ($this->_default === null) {
            $this->_table->alter(
                sprintf('ALTER COLUMN %s DROP DEFAULT', $this->_database->prepareIdentifier($this->_name))
            );
        } else {
            $this->_table->alter(
                sprintf(
                    'ALTER COLUMN %s SET DEFAULT %s',
                    $this->_database->prepareIdentifier($this->_name),
                    $this->_database->prepareValue($this->_default, $this->_datatype)
                )
            );
        }
    }
751813
def initialize(self, value=()):
        
        if value == ():
            try:
                return self.default()
            except TypeError:
                return self.default
        else:
            return self.clean(value)
1063149
public function data_preprocessing(&$defaultvalues) {
        parent::data_preprocessing($defaultvalues);
        $defaultvalues['completionentriesenabled'] = !empty($defaultvalues['completionentries']) ? 1 : 0;
        if (empty($defaultvalues['completionentries'])) {
            $defaultvalues['completionentries'] = 1;
        }
    }
243200
def override(self, key, value):
        
        keys = key.split('.')
        if len(keys) > 1:
            if keys[0] != "plugins":
                raise AttributeError("no such setting: %r" % key)
            self.plugins.override(keys[1:], value)
        else:
            self.overrides[key] = value
            self._uncache(key)
1002242
def _setattr_default(obj, attr, value, default):
    """"""
    if value is None:
        setattr(obj, attr, default)
    else:
        setattr(obj, attr, value)
115672
def prepare(value, should_escape):
    

    if value is None:
        return u''
    type_ = type(value)
    if type_ is not strlist:
        if type_ is not str_class:
            if type_ is bool:
                value = u'true' if value else u'false'
            else:
                value = str_class(value)
        if should_escape:
            value = escape(value)
    return value
1268598
private function _applyDefaults() {
		foreach($this->_flags as $flag => $settings) {
			$this[$flag] = $settings['default'];
		}

		foreach($this->_options as $option => $settings) {
			// If the default is 0 we should still let it be set.
			if (!empty($settings['default']) || $settings['default'] === 0) {
				$this[$option] = $settings['default'];
			}
		}
	}
665626
public function prepareTheme()
    {
        $this->viewBuilder()->layout('default');
        if (!empty($this->request->params['prefix']) &&
            strtolower($this->request->params['prefix']) === 'admin'
        ) {
            $this->viewBuilder()->theme(option('back_theme'));
        } else {
            $this->viewBuilder()->theme(option('front_theme'));
        }

        if ($this->request->isAjax()) {
            $this->viewBuilder()->layout('ajax');
        }

        if ($this->request->isHome()) {
            $this->viewBuilder()->layout('home');
        }

        if ($this->request->isDashboard()) {
            $this->viewBuilder()->layout('dashboard');
        }
    }
295814
def result_code(self, value):
        
        if value == self._defaults['resultCode'] and 'resultCode' in self._values:
            del self._values['resultCode']
        else:
            self._values['resultCode'] = value
1057298
def set(self, name, value, default=False, imported=False):
        
        if name in self.__dict__:
            self.__dict__[name] = value
            return

        if name not in self.settings and self.prefix:
            prefix_name = '%s_%s' % (self.prefix, name)
            if prefix_name in self.settings:
                return  # don't do anything

        if name in self.settings:
            self.settings[name].set(value, default=default, imported=imported)
        elif not imported:
            self.params[name] = value