IWidget

Type
Interface
Namespace
Craft
Extends
Craft\ISavableComponentType
Implemented by
Craft\BaseWidget, Craft\FeedWidget, Craft\GetHelpWidget, Craft\NewUsersWidget, Craft\QuickPostWidget, Craft\RecentEntriesWidget, Craft\UpdatesWidget
Since
1.0

Interface IWidget

See also http://craftcms.com

View source

Public Methods

MethodDescription
getBodyHtml()Returns the widget's body HTML.
getClassHandle()Returns the component’s handle, ideally based on the class name.
getIconPath()Returns the path to the widget’s SVG icon.
getMaxColspan()Returns the widget's maximum colspan.
getName()Returns the component’s name.
getSettings()Returns the component’s settings model.
getSettingsHtml()Returns the component’s settings HTML.
getTitle()Returns the widget's title.
isSelectable()Returns whether this component should be shown when the user is creating a component of this type.
prepSettings()Preps the settings before they’re saved to the database.
setSettings()Sets the setting values.

getBodyHtml()

Returns the widget's body HTML.

View source

Returns

string, false – The widget’s body HTML, or false if the widget should not be visible. (If you don’t want the widget to be selectable in the first place, use {@link isSelectable()}.)

Signature

public abstract string, false getBodyHtml ( )

getIconPath()

Returns the path to the widget’s SVG icon.

View source

Returns

string – The path to the widget’s SVG icon

Signature

public abstract string getIconPath ( )

getMaxColspan()

Returns the widget's maximum colspan.

View source

Returns

integer – The widget’s maximum colspan.

Signature

public abstract integer getMaxColspan ( )

getTitle()

Returns the widget's title.

View source

Returns

string – The widget’s title.

Signature

public abstract string getTitle ( )