break; case self::TYPE_HIGHEST_PRICE: $criteria->addSorting(newPriceSorting(SortingInterface::SORT_DESC)); break; case self::TYPE_TOPSELLER: $criteria->addSorting(newPopularitySorting(SortingInterface::SORT_DESC)); break; case self::TYPE_NEWCOMER: $criteria->addSorting(newReleaseDateSorting(SortingInterface::SORT_DESC)); break; case self::TYPE_RANDOM: $criteria->addSorting(newRandomSorting()); break; }
switch($type){ case self::TYPE_TOPSELLER: $criteria->addSorting(newPopularitySorting(SortingInterface::SORT_DESC)); break; case self::TYPE_NEWCOMER: $criteria->addSorting(newReleaseDateSorting(SortingInterface::SORT_DESC)); break; case self::TYPE_RANDOM: $criteria->addSorting(newRandomSorting()); }