class Extension implements Arrayable

Constants

LOGO_MIMETYPES

Properties

protected string $id Unique Id of the extension.
protected string $path The directory of this extension.
protected array $composerJson Composer json of the package.
protected string[] $extensionDependencyIds The IDs of all Flarum extensions that this extension depends on.
protected string[] $optionalDependencyIds The IDs of all Flarum extensions that this extension should be booted after if enabled.
protected bool $installed Whether the extension is installed.
protected string $version The installed version of the extension.
string $name
string $description
string $type
array $keywords
string $homepage
string $time
string $license
array $authors
array $support
array $require
array $requireDev
array $autoload
array $autoloadDev
array $conflict
array $replace
array $provide
array $suggest
array $extra

Methods

static 
nameToId($name)

No description

__construct($path, array $composerJson)

No description

assignId()

Assigns the id for the extension used globally.

extend(Container $app)

No description

__get($name)

{@inheritdoc}

__isset($name)

{@inheritdoc}

mixed
composerJsonAttribute($name)

Dot notation getter for composer.json attributes.

Extension
setInstalled(bool $installed)

No description

bool
isInstalled()

No description

Extension
setVersion(string $version)

No description

calculateDependencies($extensionSet, $enabledIds)

Get the list of flarum extensions that this extension depends on.

string
getVersion()

No description

array|null
getIcon()

Loads the icon information from the composer.json.

enable(Container $container)

No description

disable(Container $container)

No description

string
getId()

The raw path of the directory under extensions.

string
getTitle()

No description

string
getPath()

No description

array
getExtensionDependencyIds()

The IDs of all Flarum extensions that this extension depends on.

array
getOptionalDependencyIds()

The IDs of all Flarum extensions that this extension should be booted after if enabled.

getLinks()

Compile a list of links for this extension.

bool
hasAssets()

Tests whether the extension has assets.

copyAssetsTo(FilesystemInterface $target)

No description

bool
hasMigrations()

Tests whether the extension has migrations.

migrate(Migrator $migrator, $direction = 'up')

No description

array
toArray()

Generates an array result for the object.

Details

static protected nameToId($name)

Parameters

$name

__construct($path, array $composerJson)

Parameters

$path
array $composerJson

protected assignId()

Assigns the id for the extension used globally.

extend(Container $app)

Parameters

Container $app

__get($name)

{@inheritdoc}

Parameters

$name

__isset($name)

{@inheritdoc}

Parameters

$name

mixed composerJsonAttribute($name)

Dot notation getter for composer.json attributes.

Parameters

$name

Return Value

mixed

See also

https://laravel.com/docs/5.1/helpers#arrays

Extension setInstalled(bool $installed)

Parameters

bool $installed

Return Value

Extension

bool isInstalled()

Return Value

bool

Extension setVersion(string $version)

Parameters

string $version

Return Value

Extension

calculateDependencies($extensionSet, $enabledIds)

Get the list of flarum extensions that this extension depends on.

Parameters

$extensionSet
$enabledIds

string getVersion()

Return Value

string

array|null getIcon()

Loads the icon information from the composer.json.

Return Value

array|null

enable(Container $container)

Parameters

Container $container

disable(Container $container)

Parameters

Container $container

string getId()

The raw path of the directory under extensions.

Return Value

string

string getTitle()

Return Value

string

string getPath()

Return Value

string

array getExtensionDependencyIds()

The IDs of all Flarum extensions that this extension depends on.

Return Value

array

array getOptionalDependencyIds()

The IDs of all Flarum extensions that this extension should be booted after if enabled.

Return Value

array

Compile a list of links for this extension.

bool hasAssets()

Tests whether the extension has assets.

Return Value

bool

copyAssetsTo(FilesystemInterface $target)

Parameters

FilesystemInterface $target

bool hasMigrations()

Tests whether the extension has migrations.

Return Value

bool

migrate(Migrator $migrator, $direction = 'up')

Parameters

Migrator $migrator
$direction

array toArray()

Generates an array result for the object.

Return Value

array