You are here

public function SetCanvasImageEffect::defaultConfiguration in Image Effects 8

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

Gets default configuration for this plugin.

Return value

array An associative array with the default configuration.

Overrides ImageEffectBase::defaultConfiguration

File

src/Plugin/ImageEffect/SetCanvasImageEffect.php, line 25

Class

SetCanvasImageEffect
Class SetCanvasImageEffect.

Namespace

Drupal\image_effects\Plugin\ImageEffect

Code

public function defaultConfiguration() {
  return NestedArray::mergeDeep([
    'canvas_size' => 'exact',
    'canvas_color' => NULL,
    'exact' => [
      'width' => '',
      'height' => '',
      'placement' => 'center-center',
      'x_offset' => 0,
      'y_offset' => 0,
    ],
    'relative' => [
      'left' => 0,
      'right' => 0,
      'top' => 0,
      'bottom' => 0,
    ],
  ], parent::defaultConfiguration());
}