You are here

public function AddWatermarkEffect::getSummary in Basic Watermark 8

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

Return value

array A render array.

Overrides ImageEffectBase::getSummary

File

src/Plugin/ImageEffect/AddWatermarkEffect.php, line 52

Class

AddWatermarkEffect
Converts an image resource.

Namespace

Drupal\basic_watermark\Plugin\ImageEffect

Code

public function getSummary() {
  $summary['watermark_path'] = [
    '#type' => 'item',
    '#markup' => $this
      ->t("Watermark path: @path", [
      '@path' => $this->configuration['watermark_path'],
    ]),
  ];
  $summary['apply_type'] = [
    '#type' => 'item',
    '#markup' => $this
      ->t("Apply type: @path", [
      '@path' => $this
        ->getApplyTypeOptions()[$this->configuration['apply_type']],
    ]),
  ];
  $summary['position'] = [
    '#type' => 'item',
    '#markup' => $this
      ->t("Position: @path", [
      '@path' => $this
        ->getPositionOptions()[$this->configuration['position']],
    ]),
  ];
  $summary += parent::getSummary();
  return $summary;
}