code: public static function applyDataToView($view, $data)
      {
          // do placeholder replacement, currently {xxx}
          if (!empty($data)) {
              foreach ($data as $name => $value) {
                  if (is_string($value)) {
                      // replace {xxx} in subject
                      $view = str_replace('{' . $name . '}', $value, $view);
                  }
              }
          }
  
          return $view;
      }
docs: Applies data to email view
  
  @param string $view
  @param array  $data
  
  @return string