File tree 2 files changed +30
-0
lines changed
src/Infrastructure/Content/Taxonomy
2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,20 @@ final public static function hidden(): static
48
48
);
49
49
}
50
50
51
+ final public static function editableOnly (): static
52
+ {
53
+ return self ::default ()->merge (
54
+ [
55
+ 'public ' => false ,
56
+ 'show_ui ' => true ,
57
+ 'show_in_menu ' => true ,
58
+ 'show_in_nav_menus ' => false ,
59
+ 'show_in_rest ' => true ,
60
+ 'meta_box_cb ' => false ,
61
+ ]
62
+ );
63
+ }
64
+
51
65
final public function args (): array
52
66
{
53
67
return $ this ->args ;
Original file line number Diff line number Diff line change @@ -50,6 +50,22 @@ public function testTaxonomyArgGeneration(): void
50
50
DegreeTaxonomy::public ()->args ()
51
51
);
52
52
53
+ $ this ->assertSame (
54
+ [
55
+ 'label ' => 'Degrees ' ,
56
+ 'labels ' => $ expectedLabels ,
57
+ 'hierarchical ' => true ,
58
+ 'rest_base ' => 'degree ' ,
59
+ 'public ' => false ,
60
+ 'show_ui ' => true ,
61
+ 'show_in_menu ' => true ,
62
+ 'show_in_nav_menus ' => false ,
63
+ 'show_in_rest ' => true ,
64
+ 'meta_box_cb ' => false ,
65
+ ],
66
+ DegreeTaxonomy::editableOnly ()->args ()
67
+ );
68
+
53
69
$ this ->assertSame (
54
70
[
55
71
'label ' => 'Degrees ' ,
You can’t perform that action at this time.
0 commit comments