original_string: public function filter_filters(array $cfg, $field, $operator = null): ?array
    {
      if ( isset($cfg['filters']) ){
        $f = function($cond, &$res = []) use (&$f, $field, $operator){
          foreach ( $cond as $c ){
            if ( isset($c['conditions']) ){
              $f($c['conditions'], $res);
            }
            else if ( ($c['field'] === $field) && (!$operator || ($operator === $c['operator'])) ){
              $res[] = $c;
            }
          }
          return $res;
        };
        return isset($cfg['filters']['conditions']) ? $f($cfg['filters']['conditions']) : [];
      }
      return null;
    }
code: public function filter_filters(array $cfg, $field, $operator = null): ?array
    {
      if ( isset($cfg['filters']) ){
        $f = function($cond, &$res = []) use (&$f, $field, $operator){
          foreach ( $cond as $c ){
            if ( isset($c['conditions']) ){
              $f($c['conditions'], $res);
            }
            else if ( ($c['field'] === $field) && (!$operator || ($operator === $c['operator'])) ){
              $res[] = $c;
            }
          }
          return $res;
        };
        return isset($cfg['filters']['conditions']) ? $f($cfg['filters']['conditions']) : [];
      }
      return null;
    }
code_tokens: public function filter_filters ( array $ cfg , $ field , $ operator = null ) : ? array { if ( isset ( $ cfg [ 'filters' ] ) ) { $ f = function ( $ cond , & $ res = [ ] ) use ( & $ f , $ field , $ operator ) { foreach ( $ cond as $ c ) { if ( isset ( $ c [ 'conditions' ] ) ) { $ f ( $ c [ 'conditions' ] , $ res ) ; } else if ( ( $ c [ 'field' ] === $ field ) && ( ! $ operator || ( $ operator === $ c [ 'operator' ] ) ) ) { $ res [ ] = $ c ; } } return $ res ; } ; return isset ( $ cfg [ 'filters' ] [ 'conditions' ] ) ? $ f ( $ cfg [ 'filters' ] [ 'conditions' ] ) : [ ] ; } return null ; }
docstring: Retrieve an array of specific filters among the existing ones.
  
  @param array $cfg
  @param $field
  @param null $operator
  @return array|null
docstring_tokens: Retrieve an array of specific filters among the existing ones .