You are here

public function Token::setDynamic in Hook Event Dispatcher 8.2

Same name and namespace in other branches
  1. 3.x modules/core_event_dispatcher/src/ValueObject/Token.php \Drupal\core_event_dispatcher\ValueObject\Token::setDynamic()

Set whether or not the token is dynamic.

Parameters

bool $dynamic: TRUE if the token is dynamic.

Return value

\Drupal\core_event_dispatcher\ValueObject\Token New instance with the given dynamic.

File

modules/core_event_dispatcher/src/ValueObject/Token.php, line 108

Class

Token
Token ValueObject.

Namespace

Drupal\core_event_dispatcher\ValueObject

Code

public function setDynamic(bool $dynamic) : self {
  $clone = clone $this;
  $clone->dynamic = $dynamic;
  return $clone;
}