public function getPortableElementByClass($portableElementClass, Element $qtiItem, $useVersionAlias = false){
        $portableElements = [];

        $identifiers = array_map(function($portableElement){
            return $portableElement->getTypeIdentifier();
        }, $qtiItem->getComposingElements($portableElementClass));

        foreach($this->getPortableModelRegistry()->getModels() as $model){
            $phpClass = $model->getQtiElementClassName();
            if(is_subclass_of($phpClass, $portableElementClass)){
                $portableElements = array_merge($portableElements, array_filter($model->getRegistry()->getLatestRuntimes($useVersionAlias), function($data) use ($identifiers){
                    $portableElement = reset($data);
                    if(!empty($portableElement) && in_array($portableElement['typeIdentifier'], $identifiers)){
                        return true;
                    }
                    return false;
                }));
            }
        }

        /**
         * @deprecated do not use the returned baseUrl
         */
        return $portableElements;
    }