class Extension implements Arrayable

Constants

LOGO_MIMETYPES

Properties

protected $id <p>Unique ID of the extension.</p>
protected string[] $extensionDependencyIds <p>The IDs of all Flarum extensions that this extension depends on.</p>
protected string[] $optionalDependencyIds <p>The IDs of all Flarum extensions that this extension should be booted after if enabled.</p>
protected $installed
protected $version
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

__construct(string $path, array $composerJson)

No description

static string
nameToId(string $name)

No description

void
assignId()

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

void
extend(Container $container)

No description

mixed
__get(string $name)

No description

bool
__isset(string $name)

No description

mixed
composerJsonAttribute(string $name)

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

setInstalled(bool $installed)

No description

bool
isInstalled()

No description

setVersion(string $version)

No description

void
calculateDependencies(array $extensionSet)

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

string|null
getVersion()

No description

array|null
getIcon()

No description

string
getIconStyles()

No description

void
enable(Container $container)

No description

void
disable(Container $container)

No description

string
getId()

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

string
getTitle()

No description

string
getPath()

No description

array
getExtensionDependencyIds()

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

array
getOptionalDependencyIds()

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

array
getLinks()

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

bool
hasAssets()

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

void
copyAssetsTo(Filesystem $target)

No description

bool
hasMigrations()

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

int|null
migrate(Migrator $migrator, string $direction = 'up')

No description

array
toArray()

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

string|null
getReadme()

<p>Gets the rendered contents of the extension README file as a HTML string.</p>

Details

__construct(string $path, array $composerJson)

Parameters

string $path
array $composerJson

static protected string nameToId(string $name)

Parameters

string $name

Return Value

string

protected void assignId()

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

Return Value

void

void extend(Container $container)

Parameters

Container $container

Return Value

void

mixed __get(string $name)

Parameters

string $name

Return Value

mixed

bool __isset(string $name)

Parameters

string $name

Return Value

bool

mixed composerJsonAttribute(string $name)

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

Parameters

string $name

Return Value

mixed

See also

https://laravel.com/docs/10.x/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

void calculateDependencies(array $extensionSet)

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

Parameters

array $extensionSet

Return Value

void

string|null getVersion()

Return Value

string|null

array|null getIcon()

Return Value

array|null

string getIconStyles()

Return Value

string

void enable(Container $container)

Parameters

Container $container

Return Value

void

void disable(Container $container)

Parameters

Container $container

Return Value

void

string getId()

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

Return Value

string

string getTitle()

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

array getOptionalDependencyIds()

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

Return Value

array

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

Return Value

array

bool hasAssets()

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

Return Value

bool

void copyAssetsTo(Filesystem $target)

Parameters

Filesystem $target

Return Value

void

bool hasMigrations()

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

Return Value

bool

int|null migrate(Migrator $migrator, string $direction = 'up')

Parameters

Migrator $migrator
string $direction

Return Value

int|null

array toArray()

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

Return Value

array

string|null getReadme()

<p>Gets the rendered contents of the extension README file as a HTML string.</p>

Return Value

string|null