📅  最后修改于: 2022-03-11 14:58:29.507000             🧑  作者: Mango
/**
* Implements hook_field_widget_WIDGET_TYPE_form_alter().
*/
function paragraphs_test_field_widget_entity_reference_paragraphs_form_alter(&$element, &$form_state, $context) {
if ($element['#paragraph_type'] == 'altered_paragraph') {
$element['subform']['field_text']['widget'][0]['#title'] = 'Altered title';
}
}