You are here

public function MaskImageEffect::getSummary in Image Effects 8.2

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

Class

MaskImageEffect
Class MaskImageEffect.

Namespace

Drupal\image_effects\Plugin\ImageEffect

Code

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

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