owncloud/lib/private/template/functions.php
/**
 * Shortcut for HTML imports
 * @param string $app the appname
 * @param string|string[] $file the path relative to the app's component folder,
 * if an array is given it will add all components
 */
Shortcut for HTML imports
@param string $app the appname
@param string|string[] $file the path relative to the app's component folder,
if an array is given it will add all components
Shortcut for HTML imports @param string $app the appname @param string|string [] $file the path relative to the app ' s component folder if an array is given it will add all components
function component($app, $file) {
	if(is_array($file)) {
		foreach($file as $f) {
			$url = link_to($app, 'component/' . $f . '.html');
			OC_Util::addHeader('link', array('rel' => 'import', 'href' => $url));
		}
	} else {
		$url = link_to($app, 'component/' . $file . '.html');
		OC_Util::addHeader('link', array('rel' => 'import', 'href' => $url));
	}
}
function component ( $ app , $ file ) { if ( is_array ( $ file ) ) { foreach ( $ file as $ f ) { $ url = link_to ( $ app , 'component/' . $ f . '.html' ) ; OC_Util :: addHeader ( 'link' , array ( 'rel' => 'import' , 'href' => $ url ) ) ; } } else { $ url = link_to ( $ app , 'component/' . $ file . '.html' ) ; OC_Util :: addHeader ( 'link' , array ( 'rel' => 'import' , 'href' => $ url ) ) ; } }
Shortcut for HTML imports
 @param string $app the appname
 @param string|string[] $file the path relative to the app's component folder,
 if an array is given it will add all components
Shortcut for HTML imports @param string $app the appname @param string|string [] $file the path relative to the app ' s component folder if an array is given it will add all components