| Total Complexity | 3 |
| Total Lines | 25 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | class DisplayTabsCollection extends FormElementsCollection |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @return static |
||
| 13 | */ |
||
| 14 | public function onlyActive() |
||
| 15 | { |
||
| 16 | return $this->filter(function (TabInterface $tab) { |
||
| 17 | $element = $tab->getContent(); |
||
| 18 | |||
| 19 | if ($element instanceof FormElementInterface) { |
||
| 20 | return ! $element->isReadonly(); |
||
| 21 | } |
||
| 22 | |||
| 23 | return true; |
||
| 24 | })->onlyVisible(); |
||
| 25 | } |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @return static |
||
| 29 | */ |
||
| 30 | public function onlyVisible() |
||
| 34 | }); |
||
| 35 | } |
||
| 37 |