interface TokenInterface in Courier 8
Same name and namespace in other branches
- 2.x src/TokenInterface.php \Drupal\courier\TokenInterface
Interface for TokenTrait.
Token values and options are stored for the session, they are not stored.
Hierarchy
- interface \Drupal\courier\TokenInterface
Expanded class hierarchy of TokenInterface
All classes that implement TokenInterface
File
- src/
TokenInterface.php, line 15 - Contains \Drupal\courier\TokenInterface.
Namespace
Drupal\courierView source
interface TokenInterface {
/**
* Gets token values.
*
* @return array
* Token values keyed by token type.
*/
function getTokenValues();
/**
* Sets a value to a token type.
*
* @param string $token
* A token type.
* @param mixed $value
* The token value.
*
* @return self
* Return this instance for chaining.
*/
function setTokenValue($token, $value);
/**
* Gets token options as required by \Drupal::token()->replace().
*
* @return array
* An array of token options.
*/
function getTokenOptions();
/**
* Sets a token option.
*
* @param string $option
* The token option name.
* @param mixed $value
* The token option value.
*
* @return self
* Return this instance for chaining.
*/
function setTokenOption($option, $value);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
TokenInterface:: |
function | Gets token options as required by \Drupal::token()->replace(). | ||
TokenInterface:: |
function | Gets token values. | ||
TokenInterface:: |
function | Sets a token option. | ||
TokenInterface:: |
function | Sets a value to a token type. |