Conditions | 2 |
Paths | 2 |
Total Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
80 | public function jsonSerialize(): array |
||
81 | { |
||
82 | $output = [ |
||
83 | 'field' => $this->field, |
||
84 | 'direction' => $this->direction, |
||
85 | 'is_applied' => $this->isApplied(), |
||
86 | ]; |
||
87 | |||
88 | if ($this->isApplied()) { |
||
89 | $output['unset_link'] = stringify_uri($this->getToggleUri()); |
||
90 | } else { |
||
91 | $output['link'] = stringify_uri($this->getToggleUri()); |
||
92 | } |
||
93 | |||
94 | return $output; |
||
95 | } |
||
96 | } |
||
97 |