private function replaceLibAliases(PortableElementObject $object){

        $id = $object->getTypeIdentifier();
        $object->setRuntimeKey('libraries', array_map(function($lib) use ($id) {
            if(preg_match('/^'.$id.'/', $lib)){
                return $lib.'.js';
            }
            return $lib;
        }, $object->getRuntimeKey('libraries')));

        return $object;
    }
private function replaceLibAliases(PortableElementObject $object){

        $id = $object->getTypeIdentifier();
        $object->setRuntimeKey('libraries', array_map(function($lib) use ($id) {
            if(preg_match('/^'.$id.'/', $lib)){
                return $lib.'.js';
            }
            return $lib;
        }, $object->getRuntimeKey('libraries')));

        return $object;
    }
private function replaceLibAliases ( PortableElementObject $ object ) { $ id = $ object -> getTypeIdentifier ( ) ; $ object -> setRuntimeKey ( 'libraries' , array_map ( function ( $ lib ) use ( $ id ) { if ( preg_match ( '/^' . $ id . '/' , $ lib ) ) { return $ lib . '.js' ; } return $ lib ; } , $ object -> getRuntimeKey ( 'libraries' ) ) ) ; return $ object ; }
Replace the libs aliases with their relative url before saving into the registry
This format is consistent with the format of TAO portable package manifest

@param PortableElementObject $object
@return PortableElementObject
Replace the libs aliases with their relative url before saving into the registry This format is consistent with the format of TAO portable package manifest