/** * @param Pimcore_Model_WebResource_Interface $target * @return array */ public static function getRatingAverageForTarget($target) { $type = self::getTypeFromTarget($target); $rating = new RatingsComments(); $rating->setTarget($target); $rating->setType($type); return $rating->getRatingAverageForTarget($target, $type); }