$element['fields']['entity_grouping']['color_selection_method']['#options']['by_field_on_referenced_entity']=newTranslatableMarkup('Set color based on a color field on entity reference');
// @todo remove if no plan to support this use case.
// $element['fields']['entity_grouping']['color_selection_method']['#options']['by_field_on_current_entity'] = new TranslatableMarkup('Set color based on a color field on the current entity');
$empty_entity_colors=newTranslatableMarkup('No grouping by an entity reference field was detected or the selected field didn\'t have any entity or color field attached.');
/**
* Helper method to build a color selection element by entities.
*
* @param array $metadata
* The metadata information to use to retrieve the color options.
$empty_entity_colors=newTranslatableMarkup("No grouping by an entity reference field was detected or the selected field didnt have any entity or color field attached.");
$colors=[
'#markup'=>'<p>'.$empty_entity_colors.'</p>',
];
@@ -1282,12 +1414,8 @@ class BaseSettings extends FormElement {
@@ -1379,7 +1522,7 @@ class BaseSettings extends FormElement {
}
if(!$color_field_options){
$empty_entity_field_name=newTranslatableMarkup('You can\'t set the color using the selected method because the referenced entity doesn\'t have any color field type configured.');
$empty_entity_field_name=newTranslatableMarkup("You can't set the color using the selected method because the referenced entity doesn't have any color field type configured.");