Twig/IncludeLibraryLink.php
public function Link($name, $type, $version = 'latest')
    {
        $type = strtolower($type);

        //Gets data
        $data = $this->includeLibraryService->getData($name, $type, $version);

        //Returns the href or src part
        if (null !== $data) {
            return 'css' == $type ? $data['href'] : $data['src'];
        }

        //Throws an error if not found
        throw new Error('The Library "' . $name . ' (' . $type . ') version ' . $version . '" requested via "inc_link()" was not found. Please check name and supported library/versions.');
    }
public function Link($name, $type, $version = 'latest')
    {
        $type = strtolower($type);

        //Gets data
        $data = $this->includeLibraryService->getData($name, $type, $version);

        //Returns the href or src part
        if (null !== $data) {
            return 'css' == $type ? $data['href'] : $data['src'];
        }

        //Throws an error if not found
        throw new Error('The Library "' . $name . ' (' . $type . ') version ' . $version . '" requested via "inc_link()" was not found. Please check name and supported library/versions.');
    }
public function Link ( $ name , $ type , $ version = 'latest' ) { $ type = strtolower ( $ type ) ; //Gets data $ data = $ this -> includeLibraryService -> getData ( $ name , $ type , $ version ) ; //Returns the href or src part if ( null !== $ data ) { return 'css' == $ type ? $ data [ 'href' ] : $ data [ 'src' ] ; } //Throws an error if not found throw new Error ( 'The Library "' . $ name . ' (' . $ type . ') version ' . $ version . '" requested via "inc_link()" was not found. Please check name and supported library/versions.' ) ; }
Returns the link of the requested library
@return string
@throws Error
Returns the link of the requested library