class ExtensionManager
Properties
protected | $extensions |
Methods
No description
<p>Copy the assets from an extension's assets directory into public view.</p>
<p>Runs the database migrations to reset the database to its old state.</p>
<p>Call on all enabled extensions to extend the Flarum application.</p>
<p>Persist the currently enabled extensions.</p>
<p>Sort a list of extensions so that they are properly resolved in respect to order.</p>
Details
at
line 34
__construct(SettingsRepositoryInterface $config, Paths $paths, Container $container, Migrator $migrator, Dispatcher $dispatcher, Filesystem $filesystem)
at
line 44
Collection
getExtensions()
at
line 115
Collection
getExtensionsById(array $ids)
at
line 122
Extension|null
getExtension(string $name)
at
line 130
void
enable(string $name)
at
line 168
void
disable(string $name)
at
line 202
void
uninstall(string $name)
at
line 220
protected void
publishAssets(Extension $extension)
<p>Copy the assets from an extension's assets directory into public view.</p>
at
line 228
protected void
unpublishAssets(Extension $extension)
<p>Delete an extension's assets from public view.</p>
at
line 236
string
getAsset(Extension $extension, string $path)
<p>Get the path to an extension's published asset.</p>
at
line 246
protected Cloud
getAssetsFilesystem()
<p>Get an instance of the <code>assets</code> filesystem.</p>
<p>This is resolved dynamically because Flarum's filesystem configuration might not be booted yet when the ExtensionManager singleton initializes.</p>
at
line 256
int|null
migrate(Extension $extension, string $direction = 'up')
<p>Runs the database migrations for the extension.</p>
at
line 270
void
migrateDown(Extension $extension)
<p>Runs the database migrations to reset the database to its old state.</p>
at
line 286
array
getEnabledExtensions()
at
line 303
void
extend(Container $container)
<p>Call on all enabled extensions to extend the Flarum application.</p>
at
line 315
array
getEnabled()
<p>The id's of the enabled extensions.</p>
at
line 326
protected void
setEnabledExtensions(array $enabledExtensions)
<p>Persist the currently enabled extensions.</p>
at
line 345
bool
isEnabled(string $extension)
at
line 358
static array
pluckTitles(array $extensions)
<p>Returns the titles of the extensions passed.</p>
at
line 380
static array
resolveExtensionOrder(array $extensionList)
<p>Sort a list of extensions so that they are properly resolved in respect to order.</p>
<p>Effectively just topological sorting.</p>