comparison core/modules/image/src/Plugin/ImageEffect/ConvertImageEffect.php @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents 4c8ae668cc8c
children
comparison
equal deleted inserted replaced
16:c2387f117808 17:129ea1e6d783
1 <?php 1 <?php
2 2
3 namespace Drupal\image\Plugin\ImageEffect; 3 namespace Drupal\image\Plugin\ImageEffect;
4 4
5 use Drupal\Component\Utility\Unicode;
6 use Drupal\Core\Form\FormStateInterface; 5 use Drupal\Core\Form\FormStateInterface;
7 use Drupal\Core\Image\ImageInterface; 6 use Drupal\Core\Image\ImageInterface;
8 use Drupal\image\ConfigurableImageEffectBase; 7 use Drupal\image\ConfigurableImageEffectBase;
9 8
10 /** 9 /**
39 /** 38 /**
40 * {@inheritdoc} 39 * {@inheritdoc}
41 */ 40 */
42 public function getSummary() { 41 public function getSummary() {
43 $summary = [ 42 $summary = [
44 '#markup' => Unicode::strtoupper($this->configuration['extension']), 43 '#markup' => mb_strtoupper($this->configuration['extension']),
45 ]; 44 ];
46 $summary += parent::getSummary(); 45 $summary += parent::getSummary();
47 46
48 return $summary; 47 return $summary;
49 } 48 }
62 */ 61 */
63 public function buildConfigurationForm(array $form, FormStateInterface $form_state) { 62 public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
64 $extensions = \Drupal::service('image.toolkit.manager')->getDefaultToolkit()->getSupportedExtensions(); 63 $extensions = \Drupal::service('image.toolkit.manager')->getDefaultToolkit()->getSupportedExtensions();
65 $options = array_combine( 64 $options = array_combine(
66 $extensions, 65 $extensions,
67 array_map(['\Drupal\Component\Utility\Unicode', 'strtoupper'], $extensions) 66 array_map('mb_strtoupper', $extensions)
68 ); 67 );
69 $form['extension'] = [ 68 $form['extension'] = [
70 '#type' => 'select', 69 '#type' => 'select',
71 '#title' => t('Extension'), 70 '#title' => t('Extension'),
72 '#default_value' => $this->configuration['extension'], 71 '#default_value' => $this->configuration['extension'],