class LibraryPackage extends Package implements PackageInterface

UI Library Package class

Traits

Php Config file loader and writer

Constants

LIBRARY_PARAMS_FILE_NAME

Library params config file

Properties

protected CollectionInterface $properties Package properties from Package
protected PackageRegistryInterface|null $packageRegistry Package Registry Interface from Package
protected string $path Package root path from Package
protected array $comments Config array comments from PhpConfigFile

Methods

__construct(string $path, CollectionInterface $properties, PackageRegistryInterface|null $packageRegistry = null)

Constructor

from Package
array
getDrivers()

Get drivers classes list

from Package
bool
isInstalled()

Return true if package is installed

from Package
validator()

Create package validator

from Package
string
getPath()

Get package root path

from Package
string
getVersion()

Get Package version

from Package
array|null
getLanguages()

Get suppported languages

from Package
bool
setPrimary()

Set package as primary

from Package
string|null
getType()

Get package type

from Package
mixed
getInstalOrder(mixed|null $default = null)

Get install order

from Package
string
getName()

Return package name

from Package
Collection
getProperties(bool $full = false)

Return package properties

from Package
CollectionInterface
getRequire()

Get require property

from Package
mixed
getProperty(string $name, mixed $default = null)

Get package property

from Package
bool
validate()

Validate package properties

from Package
bool
install(bool|null $primary = null)

Install package.

from Package
bool
postInstall()

Run post install actions

from Package
bool
unInstall()

UnInstall package

from Package
bool
enable()

Enable library

bool
disable()

Disable library

bool
savePackageProperties()

Save package properties file

from Package
array|null
include(string $fileName)

Include config file

array|null
includePhpArray(string $fileName)

Include php array

void
setComment(string $comment, string $key)

Set array key comment

string
getCommentsText(string $key)

Get array imtem comment as text

string
exportArray(array $data, string $arrayKey, int $currentTab = 1, int $endTab = 1)

Export array as text

string
exportItem(string $key, mixed $value, int $maxTabs)

Export item as text

string
exportConfig(array $data)

Export config as text

bool
saveConfigFile(string $fileName, array $data)

Save config file

array
getParams()

Get library params

string
getThemeFile(string $theme)

Get theme file (DEPRECATED)

void
setStatus(bool $status)

Set library status (enabled, disbled)

array
getLibraryParams()

Get library params

bool
saveLibraryParams(array $params)

Save ui library params

Details

in Package at line 53
__construct(string $path, CollectionInterface $properties, PackageRegistryInterface|null $packageRegistry = null)

Constructor

Parameters

string $path
CollectionInterface $properties
PackageRegistryInterface|null $packageRegistry

in Package at line 66
array getDrivers()

Get drivers classes list

Return Value

array

in Package at line 76
bool isInstalled()

Return true if package is installed

Return Value

bool

in Package at line 86
PackageValidator validator()

Create package validator

Return Value

PackageValidator

in Package at line 96
string getPath()

Get package root path

Return Value

string

in Package at line 106
string getVersion()

Get Package version

Return Value

string

in Package at line 116
array|null getLanguages()

Get suppported languages

Return Value

array|null

in Package at line 126
bool setPrimary()

Set package as primary

Return Value

bool

in Package at line 136
string|null getType()

Get package type

Return Value

string|null

in Package at line 147
mixed getInstalOrder(mixed|null $default = null)

Get install order

Parameters

mixed|null $default

Return Value

mixed

in Package at line 157
string getName()

Return package name

Return Value

string

in Package at line 168
Collection getProperties(bool $full = false)

Return package properties

Parameters

bool $full

Return Value

Collection

in Package at line 178
CollectionInterface getRequire()

Get require property

Return Value

CollectionInterface

in Package at line 192
mixed getProperty(string $name, mixed $default = null)

Get package property

Parameters

string $name
mixed $default

Return Value

mixed

in Package at line 202
bool validate()

Validate package properties

Return Value

bool

in Package at line 213
bool install(bool|null $primary = null)

Install package.

Parameters

bool|null $primary Primary package replaces routes or other params

Return Value

bool

in Package at line 223
bool postInstall()

Run post install actions

Return Value

bool

in Package at line 233
bool unInstall()

UnInstall package

Return Value

bool

at line 67
bool enable()

Enable library

Return Value

bool

at line 55
bool disable()

Disable library

Return Value

bool

in Package at line 263
bool savePackageProperties()

Save package properties file

Return Value

bool

in PhpConfigFile at line 33
array|null include(string $fileName)

Include config file

Parameters

string $fileName

Return Value

array|null

in PhpConfigFile at line 44
array|null includePhpArray(string $fileName)

Include php array

Parameters

string $fileName

Return Value

array|null

in PhpConfigFile at line 62
protected void setComment(string $comment, string $key)

Set array key comment

Parameters

string $comment
string $key

Return Value

void

in PhpConfigFile at line 73
protected string getCommentsText(string $key)

Get array imtem comment as text

Parameters

string $key

Return Value

string

in PhpConfigFile at line 100
protected string exportArray(array $data, string $arrayKey, int $currentTab = 1, int $endTab = 1)

Export array as text

Parameters

array $data
string $arrayKey
int $currentTab
int $endTab

Return Value

string

in PhpConfigFile at line 144
protected string exportItem(string $key, mixed $value, int $maxTabs)

Export item as text

Parameters

string $key
mixed $value
int $maxTabs

Return Value

string

in PhpConfigFile at line 158
protected string exportConfig(array $data)

Export config as text

Parameters

array $data

Return Value

string

in PhpConfigFile at line 245
bool saveConfigFile(string $fileName, array $data)

Save config file

Parameters

string $fileName
array $data

Return Value

bool

at line 34
array getParams()

Get library params

Return Value

array

at line 45
string getThemeFile(string $theme)

Get theme file (DEPRECATED)

Parameters

string $theme

Return Value

string

at line 80
void setStatus(bool $status)

Set library status (enabled, disbled)

Parameters

bool $status

Return Value

void

at line 97
array getLibraryParams()

Get library params

Return Value

array

at line 111
bool saveLibraryParams(array $params)

Save ui library params

Parameters

array $params

Return Value

bool