Craft 3 Class Reference

Interface craft\base\PreviewableFieldInterface

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\Url, craft\fields\Users
Available since version
3.0
Source Code
https://github.com/craftcms/cms/blob/master/src/base/PreviewableFieldInterface.php

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 Defined By
getTableAttributeHtml() Returns the HTML that should be shown for this field in Table View. craft\base\PreviewableFieldInterface

Method Details

getTableAttributeHtml() public abstract method #

Returns the HTML that should be shown for this field in Table View.

public abstract string getTableAttributeHtml ( $value, craft\base\ElementInterface $element )
$value mixed The field’s value
$element craft\base\ElementInterface The element the field is associated with
return string The HTML that should be shown for this field in Table View