How to override filter operators?

How to override filter operators?

Like removing in the Date Created and Date Modified the Select dropdown 'before' 'after' 'yesterday'.. and so on

I already edited and created file in /custom/modules/Cases/clients/base/filters/operators/operators.php

but doesnt seem to work..

Parents
  • Hi Longki,

    I don’t think extending filters operators to custom module specific will work.

    I mean like

    /custom/modules/Cases/clients/base/filters/operators/operators.php

    But you can achieve it by extending that to custom .like

    /custom/clients/base/filters/operators/operators.php

    You should include core operators.php to custom.like below

    require_once('clients/base/filters/operators/operators.php');

    Here you can try adding/removing your code.It will work.

    Note: Whatever you are doing inside custom/clients/ ,it will be applicable for all sidecar modules.Let say you are removing (yesterday,today,tomorrow) in date field .you can't find these three in any of sidecar module filter.

    Thanks!.

Reply
  • Hi Longki,

    I don’t think extending filters operators to custom module specific will work.

    I mean like

    /custom/modules/Cases/clients/base/filters/operators/operators.php

    But you can achieve it by extending that to custom .like

    /custom/clients/base/filters/operators/operators.php

    You should include core operators.php to custom.like below

    require_once('clients/base/filters/operators/operators.php');

    Here you can try adding/removing your code.It will work.

    Note: Whatever you are doing inside custom/clients/ ,it will be applicable for all sidecar modules.Let say you are removing (yesterday,today,tomorrow) in date field .you can't find these three in any of sidecar module filter.

    Thanks!.

Children