@trigger_error('Calling '.__METHOD__.'() without the $file_validator argument is deprecated in drupal:10.2.0 and is required in drupal:11.0.0. See https://www.drupal.org/node/3363700',E_USER_DEPRECATED);
@trigger_error('\'file_validate_size\' is deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. Use the \'FileSizeLimit\' constraint instead. See https://www.drupal.org/node/3363700',E_USER_DEPRECATED);
@trigger_error('\'file_validate_extensions\' is deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. Use the \'FileExtension\' constraint instead. See https://www.drupal.org/node/3363700',E_USER_DEPRECATED);
@trigger_error('\'file_validate_image_resolution\' is deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. Use the \'FileImageDimensions\' constraint instead. See https://www.drupal.org/node/3363700',E_USER_DEPRECATED);
$descriptions[]=t('Images must be exactly <strong>@size</strong> pixels.',['@size'=>$max]);
}
elseif($min&&$max){
$descriptions[]=t('Images must be larger than <strong>@min</strong> pixels. Images larger than <strong>@max</strong> pixels will be resized.',['@min'=>$min,'@max'=>$max]);
$descriptions[]=t('Images must be larger than <strong>@min</strong> pixels. Images larger than <strong>@max</strong> pixels will be resized.',[
'@min'=>$min,
'@max'=>$max,
]);
}
elseif($min){
$descriptions[]=t('Images must be larger than <strong>@min</strong> pixels.',['@min'=>$min]);
// Call the validation functions specified by this function's caller.
@trigger_error(__FUNCTION__.'() is deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. Use the \'file.validator\' service instead. See https://www.drupal.org/node/3363700',E_USER_DEPRECATED);
@trigger_error(__FUNCTION__.'() is deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. Use the \'file.validator\' service instead. See https://www.drupal.org/node/3363700',E_USER_DEPRECATED);
$errors=[];
if(!$file->getFilename()){
@@ -154,9 +149,14 @@ function file_validate_name_length(FileInterface $file) {
* An empty array if the file extension is allowed or an array containing an
* error message if it's not.
*
* @deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. Use the
@trigger_error(__FUNCTION__.'() is deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. Use the \'file.validator\' service instead. See https://www.drupal.org/node/3363700',E_USER_DEPRECATED);
@trigger_error(__FUNCTION__.'() is deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. Use the \'file.validator\' service instead. See https://www.drupal.org/node/3363700',E_USER_DEPRECATED);
@trigger_error(__FUNCTION__.'() is deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. Use the \'file.validator\' service instead. See https://www.drupal.org/node/3363700',E_USER_DEPRECATED);
$errors=[];
$image_factory=\Drupal::service('image.factory');
@@ -256,9 +266,14 @@ function file_validate_is_image(FileInterface $file) {
* does not meet the requirements or an attempt to resize it fails, an array
* containing the error message will be returned.
*
* @deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. Use the
@trigger_error(__FUNCTION__.'() is deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. Use the \'file.validator\' service instead. See https://www.drupal.org/node/3363700',E_USER_DEPRECATED);