protected function createObjects() { $this->objects = new ArrayList(); if ($this->options && is_array($this->options) && count($this->options)) { foreach ($this->options as $option) { $imageOptions = ProductQuestion::create_file_array_from_option($option); $image = Image::get()->filter(array("ParentID" => $this->folderID, "Name" => $imageOptions))->First(); if ($image) { $image->Key = $option; $image->Value = $option; $this->objects->push($image); } } } }