You are here

public function FilterMailchimpCampaign::tips in Mailchimp 8

Same name and namespace in other branches
  1. 2.x modules/mailchimp_campaign/src/Plugin/Filter/FilterMailchimpCampaign.php \Drupal\mailchimp_campaign\Plugin\Filter\FilterMailchimpCampaign::tips()

Generates a filter's tip.

A filter's tips should be informative and to the point. Short tips are preferably one-liners.

@todo Split into getSummaryItem() and buildGuidelines().

Parameters

bool $long: Whether this callback should return a short tip to display in a form (FALSE), or whether a more elaborate filter tips should be returned for template_preprocess_filter_tips() (TRUE).

Return value

string|null Translated text to display as a tip, or NULL if this filter has no tip.

Overrides FilterBase::tips

File

modules/mailchimp_campaign/src/Plugin/Filter/FilterMailchimpCampaign.php, line 78

Class

FilterMailchimpCampaign
Provides a filter to add content to and convert URLs for Mailchimp campaigns.

Namespace

Drupal\mailchimp_campaign\Plugin\Filter

Code

public function tips($long = FALSE) {
  $tip = $this
    ->t('Converts content tokens in the format %pattern into the appropriate rendered content and makes all paths absolute. Use the "Insert Site Content" widget below to generate tokens.', [
    '%pattern' => '[mailchimp_campaign|entity_type=node|entity_id=1|view_mode=teaser]',
  ]);
  return $tip;
}