WebpackFile
Manage webpack files
Table of Contents
Methods
- __construct() : mixed
- WebpackFile constructor.
- addResource() : void
- build() : void
- Create new or get existing webpack file.
- getOutput() : string
- Return JS-string for load assets pack File must be builded before
- markAllToRebuild() : void
- * Mark webpack files for landing as "need rebuild", but not delete them. File will be exist until not created new file.
- markToRebuild() : void
- Mark webpack files for landing as "need rebuild", but not delete them. File will be exist until not created new file.
- setFileName() : void
- Set unique name of file. If not set - will be using default
- setLandingId() : void
- Assets created for every landing.
- setPackageHash() : void
- Set unique string for current assets package
- setUseLang() : void
Methods
__construct()
WebpackFile constructor.
public
__construct() : mixed
addResource()
public
addResource(string $resource) : void
Parameters
- $resource : string
-
Relative path to asset.
build()
Create new or get existing webpack file.
public
build() : void
getOutput()
Return JS-string for load assets pack File must be builded before
public
getOutput() : string
Return values
stringmarkAllToRebuild()
* Mark webpack files for landing as "need rebuild", but not delete them. File will be exist until not created new file.
public
static markAllToRebuild() : void
markToRebuild()
Mark webpack files for landing as "need rebuild", but not delete them. File will be exist until not created new file.
public
static markToRebuild(mixed $lid) : void
Parameters
- $lid : mixed
Tags
setFileName()
Set unique name of file. If not set - will be using default
public
setFileName(string $name) : void
Parameters
- $name : string
setLandingId()
Assets created for every landing.
public
setLandingId(int $lid) : void
Parameters
- $lid : int
-
- id of landing
setPackageHash()
Set unique string for current assets package
public
setPackageHash(string $hash) : void
Parameters
- $hash : string
setUseLang()
public
setUseLang() : void