public function ViewsQuerySubstitutionsEvent::addSubstitution in Hook Event Dispatcher 3.x
Same name and namespace in other branches
- 8.2 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\ViewsCode
public function addSubstitution(string $target, string $replacement) : void {
$this->substitutions[$target] = $replacement;
}