public function toArray(): array
    {
        $groups = [];

        foreach ($this->groups as $group) {
            $key = Key::sanitize($group['name']);

            $key = sprintf('%s_%s', $this->parentKey, $key);

            $group = [
                'field' => sprintf('field_%s', Key::hash($key)),
                'operator' => $group['operator'],
                'value' => $group['value'],
            ];

            $groups[] = $group;
        }

        return $groups;
    }
public function toArray(): array
    {
        $groups = [];

        foreach ($this->groups as $group) {
            $key = Key::sanitize($group['name']);

            $key = sprintf('%s_%s', $this->parentKey, $key);

            $group = [
                'field' => sprintf('field_%s', Key::hash($key)),
                'operator' => $group['operator'],
                'value' => $group['value'],
            ];

            $groups[] = $group;
        }

        return $groups;
    }
public function toArray ( ) : array { $ groups = [ ] ; foreach ( $ this -> groups as $ group ) { $ key = Key :: sanitize ( $ group [ 'name' ] ) ; $ key = sprintf ( '%s_%s' , $ this -> parentKey , $ key ) ; $ group = [ 'field' => sprintf ( 'field_%s' , Key :: hash ( $ key ) ) , 'operator' => $ group [ 'operator' ] , 'value' => $ group [ 'value' ] , ] ; $ groups [ ] = $ group ; } return $ groups ; }
Return the conditional as array.

@return array
Return the conditional as array .