class BaseExtension extends ServiceProvider

Base Extension Class

Properties

protected array $config
array $autoload
bool $disabled

Methods

register()

Register method called when the extension is first installed.

boot()

Boot method, called right before the request route.

array
extensionMeta()

Returns information about this extension

array
registerComponents()

Registers any front-end components implemented in this extension.

array
registerPaymentGateways()

Registers any payment gateway implemented in this extension.

array
registerNavigation()

Registers back-end navigation menu items for this extension.

array
registerPermissions()

Registers any back-end permissions used by this extension.

array
registerSettings()

Registers the back-end setting links used by this extension.

void
registerSchedule(string $schedule)

Registers scheduled tasks that are executed on a regular basis.

array
registerDashboardWidgets()

Registers any dashboard widgets provided by this extension.

array
registerFormWidgets()

Registers any form widgets implemented in this extension.

array
registerMailTemplates()

Registers any mail templates implemented by this extension.

void
registerConsoleCommand(string $key, string $class)

Registers a new console (artisan) command

array|bool
getConfigFromFile()

Read configuration from Config file

getConfigFromComposerJson($configFile)

No description

Details

at line 34
register()

Register method called when the extension is first installed.

at line 41
boot()

Boot method, called right before the request route.

at line 49
array extensionMeta()

Returns information about this extension

Return Value

array

at line 60
array registerComponents()

Registers any front-end components implemented in this extension.

The components must be returned in the following format: ['path/to/class' => ['code' => 'component_code']]

Return Value

array

at line 71
array registerPaymentGateways()

Registers any payment gateway implemented in this extension.

The payment gateway must be returned in the following format: ['path/to/class' => 'alias']

Return Value

array

at line 80
array registerNavigation()

Registers back-end navigation menu items for this extension.

Return Value

array

at line 89
array registerPermissions()

Registers any back-end permissions used by this extension.

Return Value

array

at line 98
array registerSettings()

Registers the back-end setting links used by this extension.

Return Value

array

at line 109
void registerSchedule(string $schedule)

Registers scheduled tasks that are executed on a regular basis.

Parameters

string $schedule

Return Value

void

at line 117
array registerDashboardWidgets()

Registers any dashboard widgets provided by this extension.

Return Value

array

at line 129
array registerFormWidgets()

Registers any form widgets implemented in this extension.

The widgets must be returned in the following format: ['className1' => 'alias'], ['className2' => 'anotherAlias']

Return Value

array

at line 143
array registerMailTemplates()

Registers any mail templates implemented by this extension.

The templates must be returned in the following format: [ 'igniter.demo::mail.registration' => 'Registration email to customer.', ] The array key will be used as the template code

Return Value

array

at line 155
void registerConsoleCommand(string $key, string $class)

Registers a new console (artisan) command

Parameters

string $key

The command name

string $class

The command class

Return Value

void

at line 170
protected array|bool getConfigFromFile()

Read configuration from Config file

Return Value

array|bool

Exceptions

SystemException

at line 202
protected getConfigFromComposerJson($configFile)

No description

Parameters

$configFile