Beta version

class Packages extends Packages

Class Packages

Constants

ABSOLUTE

Absolute package is for reaching resources at server root.

DOCUMENTS

Document package is for reaching files with relative path to server root.

ABSOLUTE_DOCUMENTS

Document package is for reaching files with absolute url with domain-name.

PUBLIC_PATH

Public path package is for internally reaching public files with absolute path.

Be careful, this provides server paths.

PRIVATE_PATH

Private path package is for internally reaching private files with absolute path.

Be careful, this provides server paths.

FONTS_PATH

Fonts path package is for internally reaching font files with absolute path.

Be careful, this provides server paths.

Methods

__construct(VersionStrategyInterface $versionStrategy, RequestStack $requestStack, FileAwareInterface $fileAware, string $staticDomain = '', bool $isPreview = false)

Build a new asset packages for Roadiz root and documents.

bool
useStaticDomain()

No description

string
getFontsPath($relativePath)

Shortcut for $this->getUrl($relativePath, static::FONTS_PATH).

string
getPublicFilesPath($relativePath)

Shortcut for $this->getUrl($relativePath, static::PUBLIC_PATH).

string
getPrivateFilesPath($relativePath)

Shortcut for $this->getUrl($relativePath, static::PRIVATE_PATH).

string
getDocumentFilePath(Document $document)

No description

string
getDocumentFolderPath(Document $document)

No description

string
getStaticDomain()

No description

setStaticDomain(string $staticDomain)

No description

Details

at line 121
__construct(VersionStrategyInterface $versionStrategy, RequestStack $requestStack, FileAwareInterface $fileAware, string $staticDomain = '', bool $isPreview = false)

Build a new asset packages for Roadiz root and documents.

Parameters

VersionStrategyInterface $versionStrategy
RequestStack $requestStack
FileAwareInterface $fileAware
string $staticDomain
bool $isPreview

at line 148
bool useStaticDomain()

Return Value

bool

at line 284
string getFontsPath($relativePath)

Shortcut for $this->getUrl($relativePath, static::FONTS_PATH).

Parameters

$relativePath

Return Value

string

at line 295
string getPublicFilesPath($relativePath)

Shortcut for $this->getUrl($relativePath, static::PUBLIC_PATH).

Parameters

$relativePath

Return Value

string

at line 306
string getPrivateFilesPath($relativePath)

Shortcut for $this->getUrl($relativePath, static::PRIVATE_PATH).

Parameters

$relativePath

Return Value

string

at line 315
string getDocumentFilePath(Document $document)

Parameters

Document $document

Return Value

string Document file absolute path according if document is private or not.

at line 327
string getDocumentFolderPath(Document $document)

Parameters

Document $document

Return Value

string Document folder absolute path according if document is private or not.

at line 338
string getStaticDomain()

Return Value

string

at line 347
Packages setStaticDomain(string $staticDomain)

Parameters

string $staticDomain

Return Value

Packages