| Total Complexity | 5 |
| Total Lines | 59 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | class EndpointComponentEditorScript extends AbstractEditorScript |
||
| 14 | { |
||
| 15 | use GraphQLByPoPScriptTrait; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * Block name |
||
| 19 | * |
||
| 20 | * @return string |
||
| 21 | */ |
||
| 22 | protected function getScriptName(): string |
||
| 23 | { |
||
| 24 | return 'endpoint-editor-components'; |
||
| 25 | } |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Add the locale language to the localized data? |
||
| 29 | * |
||
| 30 | * @return bool |
||
| 31 | */ |
||
| 32 | protected function addLocalLanguage(): bool |
||
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Default language for the script/component's documentation |
||
| 39 | */ |
||
| 40 | protected function getDefaultLanguage(): ?string |
||
| 44 | } |
||
| 45 | |||
| 46 | /** |
||
| 47 | * In what languages is the documentation available |
||
| 48 | * |
||
| 49 | * @return string[] |
||
| 50 | */ |
||
| 51 | protected function getDocLanguages(): array |
||
| 52 | { |
||
| 53 | return array_merge( |
||
| 54 | parent::getDocLanguages(), |
||
| 55 | [ |
||
| 56 | 'es', // Spanish |
||
| 57 | ] |
||
| 58 | ); |
||
| 59 | } |
||
| 60 | |||
| 61 | /** |
||
| 62 | * Post types for which to register the script |
||
| 63 | * |
||
| 64 | * @return string[] |
||
| 65 | */ |
||
| 66 | protected function getAllowedPostTypes(): array |
||
| 72 | ] |
||
| 73 | ); |
||
| 76 |