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\QueueManager, craft\utilities\SystemMessages, craft\utilities\SystemReport, craft\utilities\Updates
Since
3.0.0

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

View source

# 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.
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

Returns

integer

# contentHtml()

Returns the utility's content HTML.

View source

Returns

string

# footerHtml()

Since
3.4.0

Returns the utility’s footer HTML.

View source

Returns

string

# iconPath()

Returns the path to the utility’s SVG icon.

View source

Returns

string, null

# 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

Returns

string

# toolbarHtml()

Since
3.4.0

Returns the utility’s toolbar HTML.

View source

Returns

string