You are here

public function TokensReplacementEvent::forToken in Hook Event Dispatcher 8

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 src/Event/Token/TokensReplacementEvent.php
Set's a replacement value for a token.

File

src/Event/Token/TokensReplacementEvent.php, line 252

Class

TokensReplacementEvent
Class TokensProvideEvent.

Namespace

Drupal\hook_event_dispatcher\Event\Token

Code

public function forToken($type, $token) {
  return $this->type === $type && isset($this->tokens[$token]);
}