Total Complexity | 7 |
Total Lines | 34 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 0 |
1 | <?php |
||
10 | class PostTypes extends PostTypeRegistrationModule |
||
11 | { |
||
12 | protected function postTypes(): array |
||
13 | { |
||
14 | return $this->factory()->createMany($this->getPostTypeResource()); |
||
15 | } |
||
16 | |||
17 | protected function getPostTypeResource(): array |
||
20 | } |
||
21 | |||
22 | protected function factory(): PostTypeFactoryInterface |
||
23 | { |
||
24 | return new PostTypeFactory($this->extension->prefix('', '_')); |
||
25 | } |
||
26 | |||
27 | protected function optionHandlers(): ?PostTypeOptionHandlerCollectionInterface |
||
28 | { |
||
29 | $service = $this->optionHandlerService(); |
||
30 | |||
31 | return $this->hasService($service) |
||
32 | ? $this->getService($service) |
||
33 | : null; |
||
34 | } |
||
35 | |||
36 | protected function postTypeResourceKey(): string |
||
37 | { |
||
38 | return 'post_types'; |
||
39 | } |
||
40 | |||
41 | protected function optionHandlerService(): string |
||
44 | } |
||
45 | } |
||
46 |