class Extension implements Arrayable

Constants

LOGO_MIMETYPES

Properties

protected string $id <p>Unique Id of the extension.</p>
protected string $path <p>The directory of this extension.</p>
protected array $composerJson <p>Composer json of the package.</p>
protected string[] $extensionDependencyIds <p>The IDs of all Flarum extensions that this extension depends on.</p>
protected bool $installed <p>Whether the extension is installed.</p>
protected string $version <p>The installed version of the extension.</p>
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()

<p>Assigns the id for the extension used globally.</p>

extend(Container $app)

No description

__get($name)

<p>{@inheritdoc}</p>

__isset($name)

<p>{@inheritdoc}</p>

mixed
composerJsonAttribute($name)

<p>Dot notation getter for composer.json attributes.</p>

setInstalled(bool $installed)

No description

bool
isInstalled()

No description

setVersion(string $version)

No description

calculateDependencies($extensionSet)

<p>Get the list of flarum extensions that this extension depends on.</p>

string
getVersion()

No description

array|null
getIcon()

<p>Loads the icon information from the composer.json.</p>

enable(Container $container)

No description

disable(Container $container)

No description

string
getId()

<p>The raw path of the directory under extensions.</p>

string
getPath()

No description

array
getExtensionDependencyIds()

<p>The IDs of all Flarum extensions that this extension depends on.</p>

getLinks()

<p>Compile a list of links for this extension.</p>

bool
hasAssets()

<p>Tests whether the extension has assets.</p>

copyAssetsTo(FilesystemInterface $target)

No description

bool
hasMigrations()

<p>Tests whether the extension has migrations.</p>

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

No description

array
toArray()

<p>Generates an array result for the object.</p>

Details

static protected nameToId($name)

Parameters

$name

__construct($path, array $composerJson)

Parameters

$path
array $composerJson

protected assignId()

<p>Assigns the id for the extension used globally.</p>

extend(Container $app)

Parameters

Container $app

__get($name)

<p>{@inheritdoc}</p>

Parameters

$name

__isset($name)

<p>{@inheritdoc}</p>

Parameters

$name

mixed composerJsonAttribute($name)

<p>Dot notation getter for composer.json attributes.</p>

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)

<p>Get the list of flarum extensions that this extension depends on.</p>

Parameters

$extensionSet

string getVersion()

Return Value

string

array|null getIcon()

<p>Loads the icon information from the composer.json.</p>

Return Value

array|null

enable(Container $container)

Parameters

Container $container

disable(Container $container)

Parameters

Container $container

string getId()

<p>The raw path of the directory under extensions.</p>

Return Value

string

string getPath()

Return Value

string

array getExtensionDependencyIds()

<p>The IDs of all Flarum extensions that this extension depends on.</p>

Return Value

array

<p>Compile a list of links for this extension.</p>

bool hasAssets()

<p>Tests whether the extension has assets.</p>

Return Value

bool

copyAssetsTo(FilesystemInterface $target)

Parameters

FilesystemInterface $target

bool hasMigrations()

<p>Tests whether the extension has migrations.</p>

Return Value

bool

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

Parameters

Migrator $migrator
$direction

array toArray()

<p>Generates an array result for the object.</p>

Return Value

array