Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cesarockstar1985/08ca56700431f39065e547dbde9ac5c3 to your computer and use it in GitHub Desktop.
Save cesarockstar1985/08ca56700431f39065e547dbde9ac5c3 to your computer and use it in GitHub Desktop.
$this->addFilter('InstantBondTypes.rate_calculation_type', [
'className' => 'Custom',
'method' => fn(Query $query, $field, $value, $data, $options) => $query
->contain(['InstantBondTypes'])
->where($query->newExpr()->like($query->identifier('InstantBondTypes.rate_calculation_type'), $value . '%')),
]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment