protected function get_slots_by_slotid($slots) {
        if (!$slots) {
            return array();
        }
        $newslots = array();
        foreach ($slots as $slot) {
            $newslots[$slot->id] = $slot;
        }
        return $newslots;
    }
protected function get_slots_by_slotid($slots) {
        if (!$slots) {
            return array();
        }
        $newslots = array();
        foreach ($slots as $slot) {
            $newslots[$slot->id] = $slot;
        }
        return $newslots;
    }
protected function get_slots_by_slotid ( $ slots ) { if ( ! $ slots ) { return array ( ) ; } $ newslots = array ( ) ; foreach ( $ slots as $ slot ) { $ newslots [ $ slot -> id ] = $ slot ; } return $ newslots ; }
Return array of slots with slot id as key
@param stdClass[] $slots
@return stdClass[]
Return array of slots with slot id as key