/** * Handles loading a question, populating it with the given data * * This will return a clean copy of the plugin, populated with the values * from the data array * * @param array $data * @return \self */ public function loadQuestion($data) { $question = new self($this->pluginManager, $this->id); $question->populate($data); $question->isQuestion(true); // Signal this is not the plugin, but a question object return $question; }