| @@ 86-93 (lines=8) @@ | ||
| 83 | 'order' => $this->getSortDirection($sortField, $options), |
|
| 84 | ]; |
|
| 85 | ||
| 86 | if (isset($options['sortNestedPath'])) { |
|
| 87 | $path = is_callable($options['sortNestedPath']) ? |
|
| 88 | $options['sortNestedPath']($sortField) : $options['sortNestedPath']; |
|
| 89 | ||
| 90 | if (!empty($path)) { |
|
| 91 | $sort['nested_path'] = $path; |
|
| 92 | } |
|
| 93 | } |
|
| 94 | ||
| 95 | if (isset($options['sortNestedFilter'])) { |
|
| 96 | $filter = is_callable($options['sortNestedFilter']) ? |
|
| @@ 95-102 (lines=8) @@ | ||
| 92 | } |
|
| 93 | } |
|
| 94 | ||
| 95 | if (isset($options['sortNestedFilter'])) { |
|
| 96 | $filter = is_callable($options['sortNestedFilter']) ? |
|
| 97 | $options['sortNestedFilter']($sortField) : $options['sortNestedFilter']; |
|
| 98 | ||
| 99 | if (!empty($filter)) { |
|
| 100 | $sort['nested_filter'] = $filter; |
|
| 101 | } |
|
| 102 | } |
|
| 103 | ||
| 104 | return $sort; |
|
| 105 | } |
|