0

I have just written a "complicated" @Filter plugin which does this:

public function process($text, $langcode) {
  return new FilterProcessResult(str_replace($this->settings['from'], $this->settings['to'], $text));
}

Now, both from and to can either be an array or a string (except the from string and to array case makes no sense.) For now I just dropped

filter_settings.str_replace:
  type: filter
  label: 'Filter URL'
  mapping:
    from:
      type: ignore
      label: from
    to:
      type: ignore
      label: to

Is there a more specific type? Is it possible for me to add a type?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.