Interface craft\base\UtilityInterface
- 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
- Available since version
- 3.0
- Source Code
- https://github.com/craftcms/cms/blob/master/src/base/UtilityInterface.php
UtilityInterface defines the common interface to be implemented by utility classes.
Method | Description | Defined By |
---|---|---|
badgeCount() |
Returns the number that should be shown in the utility’s nav item badge. | craft\base\UtilityInterface |
contentHtml() |
Returns the utility's content HTML. | craft\base\UtilityInterface |
displayName() |
Returns the display name of this class. | craft\base\ComponentInterface |
iconPath() |
Returns the path to the utility’s SVG icon. | craft\base\UtilityInterface |
id() |
Returns the utility’s unique identifier. | craft\base\UtilityInterface |
Method Details
badgeCount()
public abstract static method
#
Returns the number that should be shown in the utility’s nav item badge.
If 0
is returned, no badge will be shown
public abstract static integer badgeCount ( )
contentHtml()
public abstract static method
#
Returns the utility's content HTML.
public abstract static string contentHtml ( )
iconPath()
public abstract static method
#
Returns the path to the utility’s SVG icon.
public abstract static string, null iconPath ( )
id()
public abstract static method
#
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
).
public abstract static string id ( )