Skip to content
Snippets Groups Projects
Commit b0774e68 authored by Oleksandr Kuzava's avatar Oleksandr Kuzava
Browse files

Improve warning message for non-supported things.

parent eb7598ab
No related branches found
No related tags found
No related merge requests found
......@@ -94,7 +94,7 @@ class ContentExporter implements ContentExporterInterface {
// Display a message when we don't support base fields export for specific
// entity type.
if (!$output['base_fields']) {
$this->messenger->addWarning($this->t('Entity type "@entity_type" is not exportable out-of-the-box. Check README for a workaround.', [
$this->messenger->addWarning($this->t('Base fields of "@entity_type" is not exportable out-of-the-box. Check README for a workaround.', [
'@entity_type' => $output['entity_type'],
]));
}
......
......@@ -174,6 +174,9 @@ class ContentExportForm extends FormBase {
* Ajax callback to refresh output field.
*/
public function refreshContent(array &$form, FormStateInterface $form_state) {
// Clean up warning messages when refreshing field.
$this->messenger()->deleteByType('warning');
return $form['output'];
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment