$form_state->setErrorByName('logo_managed',$this->t('Image dimensions are bigger than the expected %widthx%height pixels and cannot be used as the navigation logo.',
[
'%width'=>$width,
'%height'=>$height,
]));
}
}
/**
* Adjusts the custom logo dimensions according to navigation settings.
*
* @param \Drupal\file\Entity\File $file
* The file entity that contains the image.
*
* @return bool
* TRUE if the logo image dimensions are properly adjusted. FALSE otherwise.
$this->messenger()->addStatus($this->t('The image was resized to fit within the navigation logo expected dimensions of %widthx%height pixels. The new dimensions of the resized image are %new_widthx%new_height pixels.',