PHP 클래스 Hostnet\Bundle\WebpackBundle\Twig\TwigExtension

저자: Harold Iedema ([email protected])
상속: extends Twig_Extension
파일 보기 프로젝트 열기: hostnet/webpack-bundle 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( string $web_dir, string $public_path, string $dump_path, string $common_js, string $common_css )
getFunctions ( )
getName ( )
getTokenParsers ( )
webpackAsset ( string $asset ) : array Returns an array containing a 'js' and 'css' key that refer to the path of the compiled asset from a browser perspective.
webpackCommonCss ( ) : string Example: "/.css".
webpackCommonJs ( ) : string Example: "/.js".
webpackPublic ( string $url ) : string Returns the mapped url for the given resource.

메소드 상세

__construct() 공개 메소드

public __construct ( string $web_dir, string $public_path, string $dump_path, string $common_js, string $common_css )
$web_dir string
$public_path string
$dump_path string
$common_js string
$common_css string

getFunctions() 공개 메소드

public getFunctions ( )

getName() 공개 메소드

public getName ( )

getTokenParsers() 공개 메소드

public getTokenParsers ( )

webpackAsset() 공개 메소드

Returns an array containing a 'js' and 'css' key that refer to the path of the compiled asset from a browser perspective.
public webpackAsset ( string $asset ) : array
$asset string
리턴 array

webpackCommonCss() 공개 메소드

Example: "/.css".
public webpackCommonCss ( ) : string
리턴 string

webpackCommonJs() 공개 메소드

Example: "/.js".
public webpackCommonJs ( ) : string
리턴 string

webpackPublic() 공개 메소드

For example: given url: "@AppBundle/images/foo.png" real path: "AppBundle/Resources/public/images/foo.png" mapped to: "//app/images/foo.png" The mapped url is either a symlink or copied asset that resides in the directory.
public webpackPublic ( string $url ) : string
$url string
리턴 string