UtilityInterface

Type
Interface
Namespace
craft\base
Extends
craft\base\ComponentInterface
Implemented by
craft\base\Utility, craft\utilities\AssetIndexes, craft\utilities\ClearCaches, craft\utilities\DbBackup, craft\utilities\DeprecationErrors, craft\utilities\FindAndReplace, craft\utilities\Migrations, craft\utilities\PhpInfo, craft\utilities\ProjectConfig, craft\utilities\QueueManager, craft\utilities\SystemMessages, craft\utilities\SystemReport, craft\utilities\Updates, craft\utilities\Upgrade
Since
3.0.0

UtilityInterface defines the common interface to be implemented by utility classes.

View source (opens new window)

# Public Methods

Method Description
badgeCount() Returns the number that should be shown in the utility’s nav item badge.
contentHtml() Returns the utility's content HTML.
displayName() Returns the display name of this class.
footerHtml() Returns the utility’s footer HTML.
iconPath() Returns the path to the utility’s SVG icon.
id() Returns the utility’s unique identifier.
isSelectable() Returns whether the component should be selectable in component Type selects.
toolbarHtml() Returns the utility’s toolbar HTML.

# badgeCount()

Returns the number that should be shown in the utility’s nav item badge.

If 0 is returned, no badge will be shown

View source (opens new window)

Returns

integer (opens new window)

# contentHtml()

Returns the utility's content HTML.

View source (opens new window)

Returns

string (opens new window)

# footerHtml()

Since
3.4.0

Returns the utility’s footer HTML.

View source (opens new window)

Returns

string (opens new window)

# iconPath()

Returns the path to the utility’s SVG icon.

View source (opens new window)

Returns

string (opens new window), null (opens new window)

# id()

Returns the utility’s unique identifier.

The ID should be in kebab-case, as it will be visible in the URL (admin/utilities/the-handle).

View source (opens new window)

Returns

string (opens new window)

# toolbarHtml()

Since
3.4.0

Returns the utility’s toolbar HTML.

View source (opens new window)

Returns

string (opens new window)