public static function TestGenerateTask::getInfoArray in Module Builder 8.3
1 call to TestGenerateTask::getInfoArray()
- TestGenerateTask::getDefinition in tests/
modules/ module_builder_test_component_type/ src/ TestGenerateTask.php
File
- tests/
modules/ module_builder_test_component_type/ src/ TestGenerateTask.php, line 57
Class
- TestGenerateTask
- Mock Generate task for functional tests.
Namespace
Drupal\module_builder_test_component_typeCode
public static function getInfoArray() {
return [
// These need to be defined for the 'Name' form to work.
'short_description' => [
'label' => 'Description',
'default' => '',
'format' => 'string',
'required' => FALSE,
],
'module_package' => [
'label' => 'Description',
'default' => '',
'format' => 'string',
'required' => FALSE,
],
'module_dependencies' => [
'label' => 'Description',
'default' => '',
'format' => 'string',
'required' => FALSE,
],
// These will show on the 'Misc' form because the entity annotation
// doesn't declare them.
'string_empty' => [
'label' => 'String empty',
'default' => '',
'format' => 'string',
'required' => FALSE,
],
'string_default' => [
'label' => 'String default',
'default' => 'default value',
'format' => 'string',
'required' => FALSE,
],
'checkbox_empty' => [
'label' => "Checkbox empty",
'required' => FALSE,
'default' => FALSE,
'format' => 'boolean',
],
'checkbox_default' => [
'label' => "Checkbox default",
'required' => FALSE,
'default' => TRUE,
'format' => 'boolean',
],
'array_empty' => [
'label' => 'Array empty',
'default' => [],
'format' => 'array',
'required' => FALSE,
],
'array_default' => [
'label' => 'Array default',
'default' => [
'value 1',
'value 2',
],
'format' => 'array',
'required' => FALSE,
],
'compound_empty' => [
'label' => 'Compound empty',
'format' => 'compound',
'required' => FALSE,
'properties' => [
'one' => [
'label' => 'One',
'required' => TRUE,
'format' => 'string',
],
'two' => [
'label' => 'Two',
'required' => FALSE,
'format' => 'string',
],
],
],
];
}