You are here

public function ViewsQuerySubstitutionsEvent::addSubstitution in Hook Event Dispatcher 8.2

Same name and namespace in other branches
  1. 3.x modules/views_event_dispatcher/src/Event/Views/ViewsQuerySubstitutionsEvent.php \Drupal\views_event_dispatcher\Event\Views\ViewsQuerySubstitutionsEvent::addSubstitution()

Add a substitution.

Parameters

string $target: String target to be replaced.

string $replacement: The replacement of the given target.

File

modules/views_event_dispatcher/src/Event/Views/ViewsQuerySubstitutionsEvent.php, line 40

Class

ViewsQuerySubstitutionsEvent
Class ViewsQuerySubstitutionEvent.

Namespace

Drupal\views_event_dispatcher\Event\Views

Code

public function addSubstitution(string $target, string $replacement) : void {
  $this->substitutions[$target] = $replacement;
}