protected function getAssets(\core_kernel_classes_Resource $item, $lang)
    {
        $qtiItem = Service::singleton()->getDataItemByRdfItem($item, $lang);
        if (is_null($qtiItem)) {
            return [];
        }
        $assetParser = new AssetParser($qtiItem, $this->getStorageDirectory($item, $lang));
        $assetParser->setGetSharedLibraries(false);
        $returnValue = array();
        foreach ($assetParser->extract() as $type => $assets) {
            foreach ($assets as $assetUrl) {
                foreach (self::$BLACKLIST as $blacklist) {
                    if (preg_match($blacklist, $assetUrl) === 1) {
                        continue(2);
                    }
                }
                $returnValue[] = $assetUrl;
            }
        }
        return $returnValue;
    }
protected function getAssets(\core_kernel_classes_Resource $item, $lang)
    {
        $qtiItem = Service::singleton()->getDataItemByRdfItem($item, $lang);
        if (is_null($qtiItem)) {
            return [];
        }
        $assetParser = new AssetParser($qtiItem, $this->getStorageDirectory($item, $lang));
        $assetParser->setGetSharedLibraries(false);
        $returnValue = array();
        foreach ($assetParser->extract() as $type => $assets) {
            foreach ($assets as $assetUrl) {
                foreach (self::$BLACKLIST as $blacklist) {
                    if (preg_match($blacklist, $assetUrl) === 1) {
                        continue(2);
                    }
                }
                $returnValue[] = $assetUrl;
            }
        }
        return $returnValue;
    }
protected function getAssets ( \ core_kernel_classes_Resource $ item , $ lang ) { $ qtiItem = Service :: singleton ( ) -> getDataItemByRdfItem ( $ item , $ lang ) ; if ( is_null ( $ qtiItem ) ) { return [ ] ; } $ assetParser = new AssetParser ( $ qtiItem , $ this -> getStorageDirectory ( $ item , $ lang ) ) ; $ assetParser -> setGetSharedLibraries ( false ) ; $ returnValue = array ( ) ; foreach ( $ assetParser -> extract ( ) as $ type => $ assets ) { foreach ( $ assets as $ assetUrl ) { foreach ( self :: $ BLACKLIST as $ blacklist ) { if ( preg_match ( $ blacklist , $ assetUrl ) === 1 ) { continue ( 2 ) ; } } $ returnValue [ ] = $ assetUrl ; } } return $ returnValue ; }
Get the item's assets

@param \core_kernel_classes_Resource $item The item
@param string                        $lang The item lang

@return string[] The assets URLs
Get the item s assets