public function YamlFormTokenManagerInterface::replace in YAML Form 8
Replace tokens in text.
Parameters
string|array $text: A string of text that may contain tokens.
\Drupal\Core\Entity\EntityInterface|null $entity: A YAML Form or YAML Form submission entity.
array $data: (optional) An array of keyed objects.
array $options: (optional) A keyed array of settings and flags to control the token replacement process.
Return value
string|array Text or array with tokens replaced.
See also
\Drupal\Core\Utility\Token::replace
1 method overrides YamlFormTokenManagerInterface::replace()
- YamlFormTokenManager::replace in src/
YamlFormTokenManager.php - Replace tokens in text.
File
- src/
YamlFormTokenManagerInterface.php, line 30
Class
- YamlFormTokenManagerInterface
- Defines an interface for token manager classes.
Namespace
Drupal\yamlformCode
public function replace($text, EntityInterface $entity = NULL, array $data = [], array $options = []);