You are here

EmailTokenEvaluatorInterface.php in Easy Email 8

Same filename and directory in other branches
  1. 2.0.x src/Service/EmailTokenEvaluatorInterface.php

File

src/Service/EmailTokenEvaluatorInterface.php
View source
<?php

namespace Drupal\easy_email\Service;

use Drupal\Core\Session\AccountInterface;
use Drupal\easy_email\Entity\EasyEmailInterface;
interface EmailTokenEvaluatorInterface {

  /**
   * Evaluate the tokens in entity email fields.
   *
   * @param \Drupal\easy_email\Entity\EasyEmailInterface $email
   */
  public function evaluateTokens(EasyEmailInterface $email);

  /**
   * @param \Drupal\easy_email\Entity\EasyEmailInterface $email
   * @param array|string $values
   * @param bool $unique
   *
   * @return array|string
   */
  public function replaceTokens(EasyEmailInterface $email, $values, $unique = FALSE);

  /**
   * @param \Drupal\easy_email\Entity\EasyEmailInterface $email
   *
   * @return bool
   */
  public function containsUnsafeTokens(EasyEmailInterface $email);

  /**
   * @param string $text
   * @param \Drupal\Core\Session\AccountInterface $recipient
   *
   * @return string
   */
  public function replaceUnsafeTokens($text, AccountInterface $recipient);

}

Interfaces