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\SearchIndexes, craft\utilities\SystemReport, craft\utilities\Updates
Since
3.0

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

View source

Public Methods

MethodDescription
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.
iconPath()Returns the path to the utility’s SVG icon.
id()Returns the utility’s unique identifier.

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

Signature

public abstract static integer badgeCount ( )

contentHtml()

Returns the utility's content HTML.

View source

Returns

string

Signature

public abstract static string contentHtml ( )

iconPath()

Returns the path to the utility’s SVG icon.

View source

Returns

string, null

Signature

public abstract static string, null iconPath ( )

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

Signature

public abstract static string id ( )