PreviewableFieldInterface ​
- Type
- Interface
- Namespace
- craft\base
- Implemented by
- craft\fields\Assets, craft\fields\BaseOptionsField, craft\fields\BaseRelationField, craft\fields\Categories, craft\fields\Checkboxes, craft\fields\Color, craft\fields\Date, craft\fields\Dropdown, craft\fields\Email, craft\fields\Entries, craft\fields\Lightswitch, craft\fields\MultiSelect, craft\fields\Number, craft\fields\PlainText, craft\fields\RadioButtons, craft\fields\Tags, craft\fields\Time, craft\fields\Url, craft\fields\Users
- Since
- 3.0.0
PreviewableFieldInterface defines the common interface to be implemented by field classes that wish to be previewable on element indexes in the control panel.
Public Methods ​
Method | Description |
---|---|
getTableAttributeHtml() | Returns the HTML that should be shown for this field in Table View. |
getTableAttributeHtml()
​
Returns the HTML that should be shown for this field in Table View.
Arguments ​
$value
(mixed
) – The field’s value$element
(craft\base\ElementInterface) – The element the field is associated with
Returns ​
string – The HTML that should be shown for this field in Table View