MCPcopy Create free account
hub / github.com/codecombat/codecombat / constructor

Method constructor

app/views/editor/level/LevelEditView.js:129–144  ·  view source on GitHub ↗
(options, levelID)

Source from the content-addressed store, hash-verified

127 }
128
129 constructor (options, levelID) {
130 super(options)
131 this.incrementBuildTime = this.incrementBuildTime.bind(this)
132 this.checkPresence = this.checkPresence.bind(this)
133 this.levelID = levelID
134 this.previouslyLoadedSubviewData = {}
135 this.supermodel.shouldSaveBackups = model => ['Level', 'LevelComponent', 'LevelSystem', 'ThangType'].includes(model.constructor.className)
136 this.levelLoader = new LevelLoader({ supermodel: this.supermodel, levelID: this.levelID, headless: true, sessionless: true, loadArticles: true })
137 this.level = this.levelLoader.level
138 this.files = new DocumentFiles(this.levelLoader.level)
139 this.supermodel.loadCollection(this.files, 'file_names')
140 this.campaigns = new Campaigns()
141 this.supermodel.trackRequest(this.campaigns.fetchByType('course', { data: { project: 'levels' } }))
142 this.courses = new CocoCollection([], { url: '/db/course', model: Course })
143 this.supermodel.loadCollection(this.courses, 'courses')
144 }
145
146 getMeta () {
147 let title = $.i18n.t('editor.level_title')

Callers

nothing calls this directly

Calls 1

fetchByTypeMethod · 0.80

Tested by

no test coverage detected