public function TokensReplacementEvent::forToken in Hook Event Dispatcher 8.2
Same name and namespace in other branches
- 3.x modules/core_event_dispatcher/src/Event/Token/TokensReplacementEvent.php \Drupal\core_event_dispatcher\Event\Token\TokensReplacementEvent::forToken()
Check if the event is for the given token.
Parameters
string $type: The token type like 'node'.
string $token: The token type like 'url'.
Return value
bool TRUE if there is one.
1 call to TokensReplacementEvent::forToken()
- TokensReplacementEvent::setReplacementValue in modules/
core_event_dispatcher/ src/ Event/ Token/ TokensReplacementEvent.php - Set's a replacement value for a token.
File
- modules/
core_event_dispatcher/ src/ Event/ Token/ TokensReplacementEvent.php, line 246
Class
- TokensReplacementEvent
- Class TokensProvideEvent.
Namespace
Drupal\core_event_dispatcher\Event\TokenCode
public function forToken(string $type, string $token) : bool {
return $this->type === $type && isset($this->tokens[$token]);
}