class ExtensionManager
Properties
| protected | $config |
|
||
| protected Paths | $paths |
|
||
| protected | $container |
|
||
| protected | $migrator |
|
||
| protected Dispatcher | $dispatcher |
|
||
| protected Filesystem | $filesystem |
|
||
| protected Collection|null | $extensions |
|
Methods
No description
Copy the assets from an extension's assets directory into public view.
Runs the database migrations to reset the database to its old state.
Re-sort and persist the enabled extension order based on current composer.json dependency declarations. Call this after a composer update so that any new or changed optional-dependencies are reflected without requiring a manual enable/disable cycle.
Sort a list of extensions so that they are properly resolved in respect to order.
Details
at
line 58
__construct(SettingsRepositoryInterface $config, Paths $paths, Container $container, Migrator $migrator, Dispatcher $dispatcher, Filesystem $filesystem)
at
line 77
Collection
getExtensions()
at
line 190
Collection
getExtensionsById(array $ids)
at
line 215
enable(string $name)
Enables the extension.
at
line 257
disable(string $name)
Disables an extension.
at
line 294
uninstall(string $name)
Uninstalls an extension.
at
line 314
protected
publishAssets(Extension $extension)
Copy the assets from an extension's assets directory into public view.
at
line 324
protected
unpublishAssets(Extension $extension)
Delete an extension's assets from public view.
at
line 336
string
getAsset(Extension $extension, string $path)
Get the path to an extension's published asset.
at
line 346
protected Cloud
getAssetsFilesystem()
Get an instance of the assets filesystem.
This is resolved dynamically because Flarum's filesystem configuration might not be booted yet when the ExtensionManager singleton initializes.
at
line 360
int
migrate(Extension $extension, string $direction = 'up')
Runs the database migrations for the extension.
at
line 377
void
migrateDown(Extension $extension)
Runs the database migrations to reset the database to its old state.
at
line 416
extend(Container $container)
Call on all enabled extensions to extend the Flarum application.
at
line 428
array
getEnabled()
The id's of the enabled extensions.
at
line 439
protected
setEnabledExtensions(array $enabledExtensions)
Persist the currently enabled extensions.
at
line 466
void
syncExtensionOrder()
Re-sort and persist the enabled extension order based on current composer.json dependency declarations. Call this after a composer update so that any new or changed optional-dependencies are reflected without requiring a manual enable/disable cycle.
at
line 477
bool
isEnabled($extension)
Whether the extension is enabled.
at
line 490
static string[]
pluckTitles(array $exts)
Returns the titles of the extensions passed.