You are here

public function ColorShiftImageEffect::getSummary in Image Effects 8

Same name and namespace in other branches
  1. 8.3 src/Plugin/ImageEffect/ColorShiftImageEffect.php \Drupal\image_effects\Plugin\ImageEffect\ColorShiftImageEffect::getSummary()
  2. 8.2 src/Plugin/ImageEffect/ColorShiftImageEffect.php \Drupal\image_effects\Plugin\ImageEffect\ColorShiftImageEffect::getSummary()

Returns a render array summarizing the configuration of the image effect.

Return value

array A render array.

Overrides ImageEffectBase::getSummary

File

src/Plugin/ImageEffect/ColorShiftImageEffect.php, line 37

Class

ColorShiftImageEffect
Shift image colors.

Namespace

Drupal\image_effects\Plugin\ImageEffect

Code

public function getSummary() {
  $data = $this->configuration;
  if ($data['RGB']) {
    $data['color_info'] = [
      '#theme' => 'image_effects_color_detail',
      '#color' => $data['RGB'],
      '#border' => TRUE,
      '#border_color' => 'matchLuma',
    ];
  }
  return [
    '#theme' => 'image_effects_color_shift_summary',
    '#data' => $data,
  ] + parent::getSummary();
}