Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| Listing | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace Cosray\Schema; |
| 6 | |
| 7 | use Attribute; |
| 8 | |
| 9 | /** |
| 10 | * How the panel lists a collection. `sortable` gives the collection's top |
| 11 | * level a manual order of its own, independent of any other collection: |
| 12 | * every entry of a flat listing, the root nodes of a `children` listing. |
| 13 | * Children always follow their parent's #[Children] declaration. |
| 14 | */ |
| 15 | #[Attribute(Attribute::TARGET_CLASS)] |
| 16 | readonly class Listing |
| 17 | { |
| 18 | /** @param list<string> $search Fields the panel search matches */ |
| 19 | public function __construct( |
| 20 | public bool $published = true, |
| 21 | public bool $locked = false, |
| 22 | public bool $hidden = false, |
| 23 | public bool $children = false, |
| 24 | public array $search = ['uid', 'title'], |
| 25 | public bool $sortable = false, |
| 26 | ) {} |
| 27 | } |