| Total Complexity | 3 |
| Total Lines | 34 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | class EndpointBlockCategory extends AbstractBlockCategory |
||
| 10 | { |
||
| 11 | public const ENDPOINT_BLOCK_CATEGORY = 'graphql-api-endpoint'; |
||
| 12 | |||
| 13 | /** |
||
| 14 | * Custom Post Type for which to enable the block category |
||
| 15 | * |
||
| 16 | * @return string[] |
||
| 17 | */ |
||
| 18 | public function getPostTypes(): array |
||
| 19 | { |
||
| 20 | return [ |
||
| 21 | GraphQLEndpointPostType::POST_TYPE, |
||
| 22 | ]; |
||
| 23 | } |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Block category's slug |
||
| 27 | * |
||
| 28 | * @return string |
||
| 29 | */ |
||
| 30 | protected function getBlockCategorySlug(): string |
||
| 31 | { |
||
| 32 | return self::ENDPOINT_BLOCK_CATEGORY; |
||
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Block category's title |
||
| 37 | * |
||
| 38 | * @return string |
||
| 39 | */ |
||
| 40 | protected function getBlockCategoryTitle(): string |
||
| 43 | } |
||
| 44 | } |
||
| 45 |