Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable filters/hooks via config.yml? #140

Open
alexwybraniec opened this issue Jun 21, 2016 · 1 comment
Open

Disable filters/hooks via config.yml? #140

alexwybraniec opened this issue Jun 21, 2016 · 1 comment

Comments

@alexwybraniec
Copy link

alexwybraniec commented Jun 21, 2016

I would like to disable the Decoda censor hook via config.yml.

The Decoda docs give this example of:
$code = new Decoda\Decoda($string); $code->removeHook('Censor');

but I can't see how this could be done in the FMBbCodeBundle.

My current workaround is to amend the Decoda package to return an empty censorship array, but this has meant editing a composer package directly.

Any help greatly appreciated.

@alquerci
Copy link
Contributor

Hello @alexwybraniec

To achieve your goal you can override the default filter sets that is named _default.
You can also use a custom filter set.

The minimalist config can be:

fm_bbcode:
  filter_sets:
    _default:
      filters: [ default ]
    my_default:
      filters: [ default, quote ]

The default settings of the _default filter sets come from Decode::default().

I hope this will help you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants