You are here

protected function CommerceAddToCartLinkViewsField::documentSelfTokens in Commerce Add To Cart Link 2.x

Same name and namespace in other branches
  1. 8 src/Plugin/views/field/CommerceAddToCartLinkViewsField.php \Drupal\commerce_add_to_cart_link\Plugin\views\field\CommerceAddToCartLinkViewsField::documentSelfTokens()

Document any special tokens this field might use for itself.

Overrides FieldPluginBase::documentSelfTokens

See also

addSelfTokens()

File

src/Plugin/views/field/CommerceAddToCartLinkViewsField.php, line 132

Class

CommerceAddToCartLinkViewsField
Defines a Views field that adds an add to cart link.

Namespace

Drupal\commerce_add_to_cart_link\Plugin\views\field

Code

protected function documentSelfTokens(&$tokens) {
  parent::documentSelfTokens($tokens);
  $tokens['{{ ' . $this->options['id'] . '__url' . ' }}'] = $this
    ->t('The URL of the add to cart link.');
}