You are here

public function AddtoCartWithQuantityFormatter::settingsSummary in Basic cart 8

Same name and namespace in other branches
  1. 8.6 src/Plugin/Field/FieldFormatter/AddToCartWithQuantityFormatter.php \Drupal\basic_cart\Plugin\Field\FieldFormatter\AddToCartWithQuantityFormatter::settingsSummary()
  2. 8.2 src/Plugin/Field/FieldFormatter/AddToCartWithQuantityFormatter.php \Drupal\basic_cart\Plugin\Field\FieldFormatter\AddtoCartWithQuantityFormatter::settingsSummary()
  3. 8.3 src/Plugin/Field/FieldFormatter/AddToCartWithQuantityFormatter.php \Drupal\basic_cart\Plugin\Field\FieldFormatter\AddtoCartWithQuantityFormatter::settingsSummary()
  4. 8.4 src/Plugin/Field/FieldFormatter/AddToCartWithQuantityFormatter.php \Drupal\basic_cart\Plugin\Field\FieldFormatter\AddtoCartWithQuantityFormatter::settingsSummary()
  5. 8.5 src/Plugin/Field/FieldFormatter/AddToCartWithQuantityFormatter.php \Drupal\basic_cart\Plugin\Field\FieldFormatter\AddtoCartWithQuantityFormatter::settingsSummary()

Returns a short summary for the current formatter settings.

If an empty result is returned, a UI can still be provided to display a settings form in case the formatter has configurable settings.

Return value

string[] A short summary of the formatter settings.

Overrides FormatterBase::settingsSummary

File

src/Plugin/Field/FieldFormatter/AddToCartWithQuantityFormatter.php, line 157

Class

AddtoCartWithQuantityFormatter
Plugin implementation of the 'addtocartwithquantity' formatter.

Namespace

Drupal\basic_cart\Plugin\Field\FieldFormatter

Code

public function settingsSummary() {
  $summary = [];
  $summary[]['#markup'] = t('Custom css classes for add to cart');
  return $summary;
}