function doVehicleSelection() { if ($this->shouldClear()) { $this->clearSelection(); return array(); } $vehicleFinder = new VF_Vehicle_Finder($this->schema); // Multi-tree (admin panel) integration if ($this->request->getParam('fit')) { $id = $this->getId(); if (!$id) { return false; } return $vehicleFinder->findByLevel($this->getLevel(), $id); } if (!$this->hasGETRequest() && !$this->hasSESSIONRequest()) { return array(); } // front-end lookup try { $params = $this->vehicleRequestParams(); if (isset($params['year_start']) && isset($params['year_end'])) { $vehicles = $vehicleFinder->findByRangeIds($params); } else { $vehicles = $vehicleFinder->findByLevelIds($params, VF_Vehicle_Finder::INCLUDE_PARTIALS); } return $vehicles; } catch (VF_Exception_DefinitionNotFound $e) { return false; } }