class ExtensionPackage extends Package implements PackageInterface, ViewComponentsInterface

Extension Package

Traits

View components trait
Console commands trait
Package jobs trait
Get package drivers.

Constants

USER

Extension type

SYSTEM

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

Methods

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

Constructor

from Package
array
getDrivers()

Get module console commands class list.

from Drivers
bool
isInstalled()

Return true if package is installed

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

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)

Get extension package properties

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 extension package

bool
postInstall()

Run post install actions

bool
unInstall()

Uninstall extension package

bool
enable()

Enable extension

bool
disable()

Disable extension

bool
savePackageProperties()

Save package properties file

from Package
string
getViewPath(string|null $componentsType = null)

Get view path

string
getComponentsPath()

Get components path

string
getPagesPath()

Get pages path

string
getEmailsPath()

Get emails components path

string
getMacrosPath()

Get macros path

array
getMacros(string|null $path = null)

Scan directory and return macros list

array
getPages(string|null $parent = null)

Scan directory and return pages list

array
getEmails(string|null $parent = null)

Scan directory and return emails list

string
getComponentPath(string|null $componentName, string $type = 'components')

Get component path

array
getComponents(string|null $parent = null, string $type = 'components')

Scan directory and return components list

array
getComponentsRecursive(string|null $path = null)

Scan directory and return components list

array
getConsoleCommands()

Get package console commands

string
getJobsPath()

Get extension jobs path

from Jobs
array
getPackageJobs()

Get extension jobs

from Jobs
string
getDriversPath()

Get module drivers path

from Drivers
array
getModels()

Get extension models.

int
registerEventsSubscribers()

Register event subscribers

integer|false
getTypeId(string|integer $typeName)

Return extension type id

string
getModelsSchemaPath()

Get extension models schema path

string
getModelsPath()

Get extension model path

string
getSubscribersPath()

Get extension subscribers path.

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 Drivers at line 24
array getDrivers()

Get module console commands class list.

Return Value

array

at line 84
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

at line 94
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

at line 53
Collection getProperties(bool $full = false)

Get extension 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

at line 140
bool install(bool|null $primary = null)

Install extension package

Parameters

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

Return Value

bool

at line 182
bool postInstall()

Run post install actions

Return Value

bool

at line 202
bool unInstall()

Uninstall extension package

Return Value

bool

at line 235
bool enable()

Enable extension

Return Value

bool

at line 254
bool disable()

Disable extension

Return Value

bool

in Package at line 263
bool savePackageProperties()

Save package properties file

Return Value

bool

in ViewComponents at line 25
string getViewPath(string|null $componentsType = null)

Get view path

Parameters

string|null $componentsType

Return Value

string

in ViewComponents at line 47
string getComponentsPath()

Get components path

Return Value

string

in ViewComponents at line 57
string getPagesPath()

Get pages path

Return Value

string

in ViewComponents at line 67
string getEmailsPath()

Get emails components path

Return Value

string

in ViewComponents at line 77
string getMacrosPath()

Get macros path

Return Value

string

in ViewComponents at line 88
array getMacros(string|null $path = null)

Scan directory and return macros list

Parameters

string|null $path

Return Value

array

in ViewComponents at line 115
array getPages(string|null $parent = null)

Scan directory and return pages list

Parameters

string|null $parent

Return Value

array

in ViewComponents at line 126
array getEmails(string|null $parent = null)

Scan directory and return emails list

Parameters

string|null $parent

Return Value

array

in ViewComponents at line 138
string getComponentPath(string|null $componentName, string $type = 'components')

Get component path

Parameters

string|null $componentName
string $type

Return Value

string

in ViewComponents at line 153
array getComponents(string|null $parent = null, string $type = 'components')

Scan directory and return components list

Parameters

string|null $parent
string $type

Return Value

array

in ViewComponents at line 186
array getComponentsRecursive(string|null $path = null)

Scan directory and return components list

Parameters

string|null $path

Return Value

array

in ConsoleCommands at line 24
array getConsoleCommands()

Get package console commands

Return Value

array

in Jobs at line 26
string getJobsPath()

Get extension jobs path

Return Value

string

in Jobs at line 36
array getPackageJobs()

Get extension jobs

Return Value

array

in Drivers at line 52
string getDriversPath()

Get module drivers path

Return Value

string

at line 106
array getModels()

Get extension models.

Return Value

array

at line 273
int registerEventsSubscribers()

Register event subscribers

Return Value

int

at line 301
integer|false getTypeId(string|integer $typeName)

Return extension type id

Parameters

string|integer $typeName

Return Value

integer|false

at line 311
string getModelsSchemaPath()

Get extension models schema path

Return Value

string

at line 321
string getModelsPath()

Get extension model path

Return Value

string

at line 331
string getSubscribersPath()

Get extension subscribers path.

Return Value

string