Plugin
extends PluginBase
in package
User Extended Core by Shawn Clake Major Contributors: Quinn Bast
User Extended is licensed under the MIT license.
Tags
Table of Contents
- $disabled : bool
- $elevated : bool
- $publishes : array<string|int, mixed>
- The paths that should be published.
- $publishGroups : array<string|int, mixed>
- The paths that should be published by group.
- $require : array<string|int, mixed>
- An array containing the plugins which UserExtended depnds on
- $app : Application
- The application instance.
- $defer : bool
- Indicates if loading of the provider is deferred.
- $loadedYamlConfiguration : bool
- __construct() : void
- Create a new service provider instance.
- boot() : array<string|int, mixed>
- Boot method, called right before the request route.
- commands() : void
- Register the package's custom Artisan commands.
- getListChoice() : string
- Generates a string based on the chosen dropdown choice.
- injectAssets() : mixed
- Injects assets from modules. Also overrides the defaults presented in general.js and general.css
- isDeferred() : bool
- Determine if the provider is deferred.
- pathsToPublish() : array<string|int, mixed>
- Get the paths to publish.
- pluginDetails() : array<string|int, mixed>
- Returns information about this plugin.
- 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 method, called when the plugin is first registered.
- registerComponents() : array<string|int, mixed>
- Registers any front-end components implemented in this plugin.
- registerConsoleCommand() : void
- Registers a new console (artisan) command
- registerFormWidgets() : array<string|int, mixed>
- Registers any form widgets implemented in this plugin.
- registerListColumnTypes() : array<string|int, mixed>
- Registers column types for a model's columns.yaml to use
- registerMailLayouts() : array<string|int, mixed>
- Registers any mail layouts implemented by this plugin.
- registerMailPartials() : array<string|int, mixed>
- Registers any mail partials implemented by this plugin.
- registerMailTemplates() : array<string|int, mixed>
- Registers mail templates
- registerMarkupTags() : array<string|int, mixed>
- Adds twig filters and functions
- registerNavigation() : array<string|int, mixed>
- Registers back-end navigation items for this plugin.
- registerPermissions() : array<string|int, mixed>
- Registers any back-end permissions used by this plugin.
- registerReportWidgets() : array<string|int, mixed>
- Registers any report widgets provided by this plugin.
- registerSchedule() : void
- Registers scheduled tasks that are executed on a regular basis.
- registerSettings() : array<string|int, mixed>
- Registers the settings model for User Extended
- 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.
- ensurePublishArrayInitialized() : void
- Ensure the publish array for the service provider is initialized.
- getConfigurationFromYaml() : array<string|int, mixed>|bool
- Read configuration from YAML file
- 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.
Properties
$disabled
public
bool
$disabled
= false
Determine if this plugin should be loaded (false) or not (true).
$elevated
public
bool
$elevated
= false
Determine if this plugin should have elevated privileges.
$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
= []
$require
An array containing the plugins which UserExtended depnds on
public
array<string|int, mixed>
$require
= ['RainLab.User']
$app
The application instance.
protected
Application
$app
$defer
Indicates if loading of the provider is deferred.
protected
bool
$defer
= false
$loadedYamlConfiguration
protected
bool
$loadedYamlConfiguration
= false
Methods
__construct()
Create a new service provider instance.
public
__construct(Application $app) : void
Parameters
- $app : Application
Return values
void —boot()
Boot method, called right before the request route.
public
boot() : array<string|int, mixed>
Return values
array<string|int, mixed> —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 —getListChoice()
Generates a string based on the chosen dropdown choice.
public
getListChoice( $value, $column, $record) : string
The key of the dropdown choice is compared to an array return by a class and function specified in the columns.yaml. The value at this key in the returned array is what is returned.
Parameters
Return values
string —injectAssets()
Injects assets from modules. Also overrides the defaults presented in general.js and general.css
public
static injectAssets( $component) : mixed
Parameters
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> —pluginDetails()
Returns information about this plugin.
public
pluginDetails() : array<string|int, mixed>
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 method, called when the plugin is first registered.
public
register() : void
Return values
void —registerComponents()
Registers any front-end components implemented in this plugin.
public
registerComponents() : array<string|int, mixed>
Return values
array<string|int, mixed> —registerConsoleCommand()
Registers a new console (artisan) command
public
registerConsoleCommand(string $key, string $class) : void
Parameters
- $key : string
-
The command name
- $class : string
-
The command class
Return values
void —registerFormWidgets()
Registers any form widgets implemented in this plugin.
public
registerFormWidgets() : array<string|int, mixed>
The widgets must be returned in the following format:
return [ ['className1' => 'alias'], ['className2' => 'anotherAlias'] ];
Return values
array<string|int, mixed> —registerListColumnTypes()
Registers column types for a model's columns.yaml to use
public
registerListColumnTypes() : array<string|int, mixed>
Return values
array<string|int, mixed> —registerMailLayouts()
Registers any mail layouts implemented by this plugin.
public
registerMailLayouts() : array<string|int, mixed>
The layouts must be returned in the following format:
return [ 'marketing' => 'acme.blog::layouts.marketing', 'notification' => 'acme.blog::layouts.notification', ];
Return values
array<string|int, mixed> —registerMailPartials()
Registers any mail partials implemented by this plugin.
public
registerMailPartials() : array<string|int, mixed>
The partials must be returned in the following format:
return [ 'tracking' => 'acme.blog::partials.tracking', 'promotion' => 'acme.blog::partials.promotion', ];
Return values
array<string|int, mixed> —registerMailTemplates()
Registers mail templates
public
registerMailTemplates() : array<string|int, mixed>
Return values
array<string|int, mixed> —registerMarkupTags()
Adds twig filters and functions
public
registerMarkupTags() : array<string|int, mixed>
Return values
array<string|int, mixed> —registerNavigation()
Registers back-end navigation items for this plugin.
public
registerNavigation() : array<string|int, mixed>
Return values
array<string|int, mixed> —registerPermissions()
Registers any back-end permissions used by this plugin.
public
registerPermissions() : array<string|int, mixed>
Return values
array<string|int, mixed> —registerReportWidgets()
Registers any report widgets provided by this plugin.
public
registerReportWidgets() : array<string|int, mixed>
The widgets must be returned in the following format:
return [ 'className1'=>[ 'label' => 'My widget 1', 'context' => ['context-1', 'context-2'], ], 'className2' => [ 'label' => 'My widget 2', 'context' => 'context-1' ] ];
Return values
array<string|int, mixed> —registerSchedule()
Registers scheduled tasks that are executed on a regular basis.
public
registerSchedule(Schedule $schedule) : void
Parameters
- $schedule : Schedule
Return values
void —registerSettings()
Registers the settings model for User Extended
public
registerSettings() : array<string|int, mixed>
Return values
array<string|int, mixed> —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 —ensurePublishArrayInitialized()
Ensure the publish array for the service provider is initialized.
protected
ensurePublishArrayInitialized(string $class) : void
Parameters
- $class : string
Return values
void —getConfigurationFromYaml()
Read configuration from YAML file
protected
getConfigurationFromYaml([string|null $exceptionMessage = null ]) : array<string|int, mixed>|bool
Parameters
- $exceptionMessage : string|null = null
Tags
Return values
array<string|int, mixed>|bool —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