PluginTrait

Type
Trait
Namespace
craft\base
Implemented by
craft\base\Plugin
Since
3.0

PluginTrait implements the common methods and properties for plugin classes.

View source

Public Properties

PropertyDescription
$changelogUrlstring, null – The plugin’s changelog URL
$descriptionstring, null – The plugin’s description
$developerstring, null – The plugin developer’s name
$developerEmailstring, null – The plugin developer’s support email
$developerUrlstring, null – The plugin developer’s website URL
$documentationUrlstring, null – The plugin’s documentation URL
$downloadUrlstring, null – The plugin’s download URL
$hasCpSectionboolean – Whether the plugin has its own section in the CP
$hasCpSettingsboolean – Whether the plugin has a settings page in the CP
$isInstalledboolean – Whether the plugin is currently installed.
$minVersionRequiredstring – The minimum required version the plugin has to be so it can be updated.
$namestring, null – The plugin’s display name
$packageNamestring, null – The plugin’s package name
$schemaVersionstring, null – The plugin’s schema version number
$sourceLanguagestring – The language that the plugin’s messages were written in
$t9nCategorystring, null – The translation category that this plugin’s translation messages should use.

$changelogUrl

Type
string, null

The plugin’s changelog URL

View source

Signature

public string, null $changelogUrl = null

$description

Type
string, null

The plugin’s description

View source

Signature

public string, null $description = null

$developer

Type
string, null

The plugin developer’s name

View source

Signature

public string, null $developer = null

$developerEmail

Type
string, null

The plugin developer’s support email

View source

Signature

public string, null $developerEmail = null

$developerUrl

Type
string, null

The plugin developer’s website URL

View source

Signature

public string, null $developerUrl = null

$documentationUrl

Type
string, null

The plugin’s documentation URL

View source

Signature

public string, null $documentationUrl = null

$downloadUrl

Type
string, null

The plugin’s download URL

View source

Signature

public string, null $downloadUrl = null

$hasCpSection

Type
boolean

Whether the plugin has its own section in the CP

View source

Signature

public boolean $hasCpSection = false

$hasCpSettings

Type
boolean

Whether the plugin has a settings page in the CP

View source

Signature

public boolean $hasCpSettings = false

$isInstalled

Type
boolean

Whether the plugin is currently installed. (Will only be false when a plugin is currently being installed.)

View source

Signature

public boolean $isInstalled = false

$minVersionRequired

Type
string

The minimum required version the plugin has to be so it can be updated.

View source

Signature

public string $minVersionRequired = null

$name

Type
string, null

The plugin’s display name

View source

Signature

public string, null $name = null

$packageName

Type
string, null

The plugin’s package name

View source

Signature

public string, null $packageName = null

$schemaVersion

Type
string, null

The plugin’s schema version number

View source

Signature

public string, null $schemaVersion = '1.0.0'

$sourceLanguage

Type
string

The language that the plugin’s messages were written in

View source

Signature

public string $sourceLanguage = 'en-US'

$t9nCategory

Type
string, null

The translation category that this plugin’s translation messages should use. Defaults to the lowercased plugin handle.

View source

Signature

public string, null $t9nCategory = null