Documentation

ServiceProvider extends ModuleServiceProvider
in package

Table of Contents

$publishes  : array<string|int, mixed>
The paths that should be published.
$publishGroups  : array<string|int, mixed>
The paths that should be published by group.
$app  : Application
The application instance.
$defer  : bool
Indicates if loading of the provider is deferred.
__construct()  : void
Create a new service provider instance.
boot()  : void
Bootstrap the module events.
commands()  : void
Register the package's custom Artisan commands.
getModule()  : mixed
isDeferred()  : bool
Determine if the provider is deferred.
pathsToPublish()  : array<string|int, mixed>
Get the paths to publish.
provides()  : array<string|int, mixed>
Get the services provided by the provider.
publishableGroups()  : array<string|int, mixed>
Get the groups available for publishing.
publishableProviders()  : array<string|int, mixed>
Get the service providers available for publishing.
register()  : void
Register the service provider.
registerConsoleCommand()  : void
Registers a new console (artisan) command
when()  : array<string|int, mixed>
Get the events that trigger this service provider to register.
addPublishGroup()  : void
Add a publish group / tag to the service provider.
applyDatabaseDefaultStringLength()  : mixed
Fix UTF8MB4 support for old versions of MariaDB (<10.2) and MySQL (<5.7)
ensurePublishArrayInitialized()  : void
Ensure the publish array for the service provider is initialized.
loadConfigFrom()  : void
Register a config file namespace.
loadJsonTranslationsFrom()  : void
Register a JSON translation file path.
loadMigrationsFrom()  : void
Register a database migration path.
loadRoutesFrom()  : void
Load the given routes file if routes are not already cached.
loadTranslationsFrom()  : void
Register a translation file namespace.
loadViewsFrom()  : void
Register a view file namespace.
mergeConfigFrom()  : void
Merge the given configuration with the existing configuration.
pathsForProviderAndGroup()  : array<string|int, mixed>
Get the paths for the provider and group.
pathsForProviderOrGroup()  : array<string|int, mixed>
Get the paths for the provider or group (or both).
publishes()  : void
Register paths to be published by the publish command.
registerAssetBundles()  : mixed
Register asset bundles
registerBackendNavigation()  : mixed
registerBackendPermissions()  : mixed
registerBackendReportWidgets()  : mixed
registerBackendSettings()  : mixed
registerConsole()  : mixed
Register command line specifics
registerErrorHandler()  : mixed
registerGlobalViewVars()  : mixed
registerLogging()  : mixed
registerMailer()  : mixed
Register mail templating and settings override.
registerMarkupTags()  : mixed
registerPrivilegedActions()  : mixed
Check for CLI or system/updates route and disable any plugin initialization
registerSingletons()  : mixed
Register singletons
registerTwigParser()  : mixed
registerValidator()  : mixed
Extends the validator with custom rules

Properties

$publishes

The paths that should be published.

public static array<string|int, mixed> $publishes = []

$publishGroups

The paths that should be published by group.

public static array<string|int, mixed> $publishGroups = []

$defer

Indicates if loading of the provider is deferred.

protected bool $defer = false

Methods

boot()

Bootstrap the module events.

public boot() : void
Return values
void

commands()

Register the package's custom Artisan commands.

public commands(array<string|int, mixed>|mixed $commands) : void
Parameters
$commands : array<string|int, mixed>|mixed
Return values
void

getModule()

public getModule(mixed $args) : mixed
Parameters
$args : mixed
Return values
mixed

isDeferred()

Determine if the provider is deferred.

public isDeferred() : bool
Return values
bool

pathsToPublish()

Get the paths to publish.

public static pathsToPublish([string $provider = null ][, string $group = null ]) : array<string|int, mixed>
Parameters
$provider : string = null
$group : string = null
Return values
array<string|int, mixed>

provides()

Get the services provided by the provider.

public provides() : array<string|int, mixed>
Return values
array<string|int, mixed>

publishableGroups()

Get the groups available for publishing.

public static publishableGroups() : array<string|int, mixed>
Return values
array<string|int, mixed>

publishableProviders()

Get the service providers available for publishing.

public static publishableProviders() : array<string|int, mixed>
Return values
array<string|int, mixed>

register()

Register the service provider.

public register() : void
Return values
void

registerConsoleCommand()

Registers a new console (artisan) command

public registerConsoleCommand( $key,  $class) : void
Parameters
$key :

The command name

$class :

The command class

Return values
void

when()

Get the events that trigger this service provider to register.

public when() : array<string|int, mixed>
Return values
array<string|int, mixed>

addPublishGroup()

Add a publish group / tag to the service provider.

protected addPublishGroup(string $group, array<string|int, mixed> $paths) : void
Parameters
$group : string
$paths : array<string|int, mixed>
Return values
void

applyDatabaseDefaultStringLength()

Fix UTF8MB4 support for old versions of MariaDB (<10.2) and MySQL (<5.7)

protected applyDatabaseDefaultStringLength() : mixed
Return values
mixed

ensurePublishArrayInitialized()

Ensure the publish array for the service provider is initialized.

protected ensurePublishArrayInitialized(string $class) : void
Parameters
$class : string
Return values
void

loadConfigFrom()

Register a config file namespace.

protected loadConfigFrom(string $path, string $namespace) : void
Parameters
$path : string
$namespace : string
Return values
void

loadJsonTranslationsFrom()

Register a JSON translation file path.

protected loadJsonTranslationsFrom(string $path) : void
Parameters
$path : string
Return values
void

loadMigrationsFrom()

Register a database migration path.

protected loadMigrationsFrom(array<string|int, mixed>|string $paths) : void
Parameters
$paths : array<string|int, mixed>|string
Return values
void

loadRoutesFrom()

Load the given routes file if routes are not already cached.

protected loadRoutesFrom(string $path) : void
Parameters
$path : string
Return values
void

loadTranslationsFrom()

Register a translation file namespace.

protected loadTranslationsFrom(string $path, string $namespace) : void
Parameters
$path : string
$namespace : string
Return values
void

loadViewsFrom()

Register a view file namespace.

protected loadViewsFrom(string|array<string|int, mixed> $path, string $namespace) : void
Parameters
$path : string|array<string|int, mixed>
$namespace : string
Return values
void

mergeConfigFrom()

Merge the given configuration with the existing configuration.

protected mergeConfigFrom(string $path, string $key) : void
Parameters
$path : string
$key : string
Return values
void

pathsForProviderAndGroup()

Get the paths for the provider and group.

protected static pathsForProviderAndGroup(string $provider, string $group) : array<string|int, mixed>
Parameters
$provider : string
$group : string
Return values
array<string|int, mixed>

pathsForProviderOrGroup()

Get the paths for the provider or group (or both).

protected static pathsForProviderOrGroup(string|null $provider, string|null $group) : array<string|int, mixed>
Parameters
$provider : string|null
$group : string|null
Return values
array<string|int, mixed>

publishes()

Register paths to be published by the publish command.

protected publishes(array<string|int, mixed> $paths[, string $group = null ]) : void
Parameters
$paths : array<string|int, mixed>
$group : string = null
Return values
void

registerAssetBundles()

Register asset bundles

protected registerAssetBundles() : mixed
Return values
mixed

registerBackendNavigation()

protected registerBackendNavigation() : mixed
Return values
mixed

registerBackendPermissions()

protected registerBackendPermissions() : mixed
Return values
mixed

registerBackendReportWidgets()

protected registerBackendReportWidgets() : mixed
Return values
mixed

registerBackendSettings()

protected registerBackendSettings() : mixed
Return values
mixed

registerConsole()

Register command line specifics

protected registerConsole() : mixed
Return values
mixed

registerErrorHandler()

protected registerErrorHandler() : mixed
Return values
mixed

registerGlobalViewVars()

protected registerGlobalViewVars() : mixed
Return values
mixed

registerLogging()

protected registerLogging() : mixed
Return values
mixed

registerMailer()

Register mail templating and settings override.

protected registerMailer() : mixed
Return values
mixed

registerMarkupTags()

protected registerMarkupTags() : mixed
Return values
mixed

registerPrivilegedActions()

Check for CLI or system/updates route and disable any plugin initialization

protected registerPrivilegedActions() : mixed
Return values
mixed

registerSingletons()

Register singletons

protected registerSingletons() : mixed
Return values
mixed

registerTwigParser()

protected registerTwigParser() : mixed
Return values
mixed

registerValidator()

Extends the validator with custom rules

protected registerValidator() : mixed
Return values
mixed

Search results