| Conditions | 2 |
| Paths | 2 |
| Total Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 75 | public function jsonSerialize(): array |
||
| 76 | { |
||
| 77 | $output = [ |
||
| 78 | 'type' => $this->getType(), |
||
| 79 | 'field' => $this->getField(), |
||
| 80 | 'value' => $this->getFilterValue(), |
||
| 81 | 'is_applied' => $this->isApplied(), |
||
| 82 | 'is_negated' => $this->isNegated(), |
||
| 83 | ]; |
||
| 84 | |||
| 85 | if ($this->isApplied()) { |
||
| 86 | $output['unset_link'] = stringify_uri($this->getToggleUri()); |
||
| 87 | } else { |
||
| 88 | $output['link'] = stringify_uri($this->getToggleUri()); |
||
| 89 | } |
||
| 90 | |||
| 91 | return $output; |
||
| 92 | } |
||
| 93 | } |
||
| 94 |