return $data;
}
-
/**
* @covers ::processMachineName
*/
'maxlength' => 32,
'additional_property' => TRUE,
'#additional_property_with_hash' => TRUE,
- ]
+ ],
+ // The process function requires these to be set. During regular form
+ // building they are always set.
+ '#name' => 'test_machine_name',
+ '#default_value' => NULL,
];
$complete_form = [
'#type' => 'textfield',
'#id' => 'source',
],
- 'test_machine_name' => $element
+ 'test_machine_name' => $element,
];
$form_state->setCompleteForm($complete_form);
namespace Drupal\Core\Render\Element;
if (!function_exists('t')) {
+
function t($string, array $args = []) {
return strtr($string, $args);
}
+
}