/** * Looks at the user preferences and overrides any set values. * @return void */ protected function applyEditorPreferences() { // Load the editor system settings $editorSettings = EditorPreferences::instance(); $this->fontSize = $editorSettings->font_size; $this->wordWrap = $editorSettings->word_wrap; $this->codeFolding = $editorSettings->code_folding; $this->autoClosing = $editorSettings->auto_closing; $this->tabSize = $editorSettings->tab_size; $this->theme = $editorSettings->theme; $this->showInvisibles = $editorSettings->show_invisibles; $this->highlightActiveLine = $editorSettings->highlight_active_line; $this->useSoftTabs = !$editorSettings->use_hard_tabs; $this->showGutter = $editorSettings->show_gutter; }
/** * {@inheritDoc} */ public function init() { // Load the editor system settings $editorSettings = EditorPreferences::instance(); $this->fontSize = $this->getConfig('fontSize', $editorSettings->font_size); $this->wordWrap = $this->getConfig('wordWrap', $editorSettings->word_wrap); $this->codeFolding = $this->getConfig('codeFolding', $editorSettings->code_folding); $this->tabSize = $this->getConfig('tabSize', $editorSettings->tab_size); $this->theme = $this->getConfig('theme', $editorSettings->theme); $this->showInvisibles = $this->getConfig('showInvisibles', $editorSettings->show_invisibles); $this->highlightActiveLine = $this->getConfig('highlightActiveLine', $editorSettings->highlight_active_line); $this->useSoftTabs = $this->getConfig('useSoftTabs', !$editorSettings->use_hard_tabs); $this->showGutter = $this->getConfig('showGutter', $editorSettings->show_gutter); $this->language = $this->getConfig('language', 'php'); $this->margin = $this->getConfig('margin', 0); }
public function formFindModelObject() { return EditorPreferencesModel::instance(); }