System\Classes\PluginBase

Extends:

  • Illuminate\Support\ServiceProvider

PluginBase class

Public properties

public array $require

require rlugin dependencies

public boolean $disabled

disabled determines if this plugin should be loaded (false) or not (true).

Show inherited public properties

Inherited public properties

  • public static array $publishes - defined in Illuminate\Support\ServiceProvider. The paths that should be published.
  • public static array $publishGroups - defined in Illuminate\Support\ServiceProvider. The paths that should be published by group.

Protected properties

protected boolean $loadedYamlConfiguration

loadedYamlConfiguration

Show inherited protected properties

Inherited protected properties

  • protected Illuminate\Contracts\Foundation\Application $app - defined in Illuminate\Support\ServiceProvider. The application instance.

Public methods

public void boot()

boot method, called right before the request route.

public array pluginDetails()

pluginDetails returns information about this plugin, including plugin name and developer name.

public void register()

register method, called when the plugin is first registered.

public array registerComponents()

registerComponents registers any front-end components implemented in this plugin.

public void registerConsoleCommand(string $key, string $class)

registerConsoleCommand registers a new console (artisan) command

Parameters
  • string $key - The command name
  • string $class - The command class

public array registerFormWidgets()

registerFormWidgets registers any form widgets implemented in this plugin. The widgets must be returned in the following format:

return [
    ['className1' => 'alias'],
    ['className2' => 'anotherAlias']
];

public array registerListColumnTypes()

registerListColumnTypes registers custom back-end list column types introduced by this plugin.

public array registerMailLayouts()

registerMailLayouts registers any mail layouts implemented by this plugin. The layouts must be returned in the following format:

return [
    'marketing'    => 'acme.blog::layouts.marketing',
    'notification' => 'acme.blog::layouts.notification',
];

public array registerMailPartials()

registerMailPartials registers any mail partials implemented by this plugin. The partials must be returned in the following format:

return [
    'tracking'  => 'acme.blog::partials.tracking',
    'promotion' => 'acme.blog::partials.promotion',
];

public array registerMailTemplates()

registerMailTemplates registers any mail templates implemented by this plugin. The templates must be returned in the following format:

return [
    'acme.blog::mail.welcome',
    'acme.blog::mail.forgot_password',
];

public array registerMarkupTags()

registerMarkupTags registers CMS markup tags introduced by this plugin.

public array registerNavigation()

registerNavigation registers back-end navigation items for this plugin.

public array registerPermissions()

registerPermissions registers any back-end permissions used by this plugin.

public array registerReportWidgets()

registerReportWidgets registers any report widgets provided by this plugin. 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'
    ]
];

public void registerSchedule(Illuminate\Console\Scheduling\Schedule $schedule)

registerSchedule registers scheduled tasks that are executed on a regular basis.

Parameters
  • Illuminate\Console\Scheduling\Schedule $schedule

public array registerSettings()

registerSettings registers any back-end configuration links used by this plugin.

Show inherited public methods

Inherited public methods

  • public void __construct(Illuminate\Contracts\Foundation\Application $app) - defined in Illuminate\Support\ServiceProvider. Create a new service provider instance.
  • public void commands(array|mixed $commands) - defined in Illuminate\Support\ServiceProvider. Register the package's custom Artisan commands.
  • public bool isDeferred() - defined in Illuminate\Support\ServiceProvider. Determine if the provider is deferred.
  • public static array pathsToPublish(string|null $provider=NULL, string|null $group=NULL) - defined in Illuminate\Support\ServiceProvider. Get the paths to publish.
  • public array provides() - defined in Illuminate\Support\ServiceProvider. Get the services provided by the provider.
  • public static array publishableGroups() - defined in Illuminate\Support\ServiceProvider. Get the groups available for publishing.
  • public static array publishableProviders() - defined in Illuminate\Support\ServiceProvider. Get the service providers available for publishing.
  • public array when() - defined in Illuminate\Support\ServiceProvider. Get the events that trigger this service provider to register.

Protected methods

protected array|bool getConfigurationFromYaml(string|null $exceptionMessage=NULL)

getConfigurationFromYaml reads configuration from YAML file

Parameters
  • string|null $exceptionMessage

Show inherited protected methods

Inherited protected methods

  • protected void addPublishGroup(string $group, array $paths) - defined in Illuminate\Support\ServiceProvider. Add a publish group / tag to the service provider.
  • protected void callAfterResolving(string $name, callable $callback) - defined in Illuminate\Support\ServiceProvider. Setup an after resolving listener, or fire immediately if already resolved.
  • protected void ensurePublishArrayInitialized(string $class) - defined in Illuminate\Support\ServiceProvider. Ensure the publish array for the service provider is initialized.
  • protected void loadFactoriesFrom(array|string $paths) - defined in Illuminate\Support\ServiceProvider. Register Eloquent model factory paths.
  • protected void loadJsonTranslationsFrom(string $path) - defined in Illuminate\Support\ServiceProvider. Register a JSON translation file path.
  • protected void loadMigrationsFrom(array|string $paths) - defined in Illuminate\Support\ServiceProvider. Register database migration paths.
  • protected void loadRoutesFrom(string $path) - defined in Illuminate\Support\ServiceProvider. Load the given routes file if routes are not already cached.
  • protected void loadTranslationsFrom(string $path, string $namespace) - defined in Illuminate\Support\ServiceProvider. Register a translation file namespace.
  • protected void loadViewsFrom(string|array $path, string $namespace) - defined in Illuminate\Support\ServiceProvider. Register a view file namespace.
  • protected void mergeConfigFrom(string $path, string $key) - defined in Illuminate\Support\ServiceProvider. Merge the given configuration with the existing configuration.
  • protected static array pathsForProviderAndGroup(string $provider, string $group) - defined in Illuminate\Support\ServiceProvider. Get the paths for the provider and group.
  • protected static array pathsForProviderOrGroup(string|null $provider, string|null $group) - defined in Illuminate\Support\ServiceProvider. Get the paths for the provider or group (or both).
  • protected void publishes(array $paths, mixed $groups=NULL) - defined in Illuminate\Support\ServiceProvider. Register paths to be published by the publish command.