Skip to content

PluginTrait ​

Type
Trait
Namespace
craft\base
Implemented by
craft\base\Plugin
Since
3.0.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
editionstring – The active edition.
hasCpSectionboolean – Whether the plugin has its own section in the control panel
hasCpSettingsboolean – Whether the plugin has a settings page in the control panel
isInstalledboolean – Whether the plugin is currently installed.
minCmsEdition\craft\enums\CmsEdition – The minimum required Craft CMS edition.
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 – 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
Default value
null

The plugin’s changelog URL.

View source

description ​

Type
string, null
Default value
null

The plugin’s description

View source

developer ​

Type
string, null
Default value
null

The plugin developer’s name

View source

developerEmail ​

Type
string, null
Default value
null

The plugin developer’s support email

View source

developerUrl ​

Type
string, null
Default value
null

The plugin developer’s website URL

View source

documentationUrl ​

Type
string, null
Default value
null

The plugin’s documentation URL

View source

downloadUrl ​

Type
string, null
Default value
null

The plugin’s download URL

View source

edition ​

Type
string
Default value
'standard'

The active edition.

View source

hasCpSection ​

Type
boolean
Default value
false

Whether the plugin has its own section in the control panel

View source

hasCpSettings ​

Type
boolean
Default value
false

Whether the plugin has a settings page in the control panel

View source

isInstalled ​

Type
boolean
Default value
false

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

View source

minCmsEdition ​

Type
\craft\enums\CmsEdition
Default value
\craft\enums\CmsEdition::Solo
Since
5.0.0

The minimum required Craft CMS edition.

View source

minVersionRequired ​

Type
string
Default value
''

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

View source

name ​

Type
string, null
Default value
null

The plugin’s display name

View source

packageName ​

Type
string, null
Default value
null

The plugin’s package name

View source

schemaVersion ​

Type
string
Default value
'1.0.0'

The plugin’s schema version number

View source

sourceLanguage ​

Type
string
Default value
'en-US'

The language that the plugin’s messages were written in

View source

t9nCategory ​

Type
string, null
Default value
null

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

View source