You are here

public function WatermarkImageEffect::getSummary in Image Effects 8

Same name and namespace in other branches
  1. 8.3 src/Plugin/ImageEffect/WatermarkImageEffect.php \Drupal\image_effects\Plugin\ImageEffect\WatermarkImageEffect::getSummary()
  2. 8.2 src/Plugin/ImageEffect/WatermarkImageEffect.php \Drupal\image_effects\Plugin\ImageEffect\WatermarkImageEffect::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/WatermarkImageEffect.php, line 96

Class

WatermarkImageEffect
Class WatermarkImageEffect.

Namespace

Drupal\image_effects\Plugin\ImageEffect

Code

public function getSummary() {
  $summary = [
    '#theme' => 'image_effects_watermark_summary',
    '#data' => $this->configuration,
  ];
  $summary += parent::getSummary();

  // Get the human readable label for placement.
  $summary['#data']['placement'] = $this
    ->anchorOptions()[$summary['#data']['placement']];
  return $summary;
}