public function TextOverlayImageEffect::defaultConfiguration in Image Effects 8
Same name and namespace in other branches
- 8.3 src/Plugin/ImageEffect/TextOverlayImageEffect.php \Drupal\image_effects\Plugin\ImageEffect\TextOverlayImageEffect::defaultConfiguration()
- 8.2 src/Plugin/ImageEffect/TextOverlayImageEffect.php \Drupal\image_effects\Plugin\ImageEffect\TextOverlayImageEffect::defaultConfiguration()
Gets default configuration for this plugin.
Return value
array An associative array with the default configuration.
Overrides ImageEffectBase::defaultConfiguration
File
- src/
Plugin/ ImageEffect/ TextOverlayImageEffect.php, line 136
Class
- TextOverlayImageEffect
- Overlays text on the image, defining text font, size and positioning.
Namespace
Drupal\image_effects\Plugin\ImageEffectCode
public function defaultConfiguration() {
return NestedArray::mergeDeep([
'font' => [
'name' => '',
'uri' => '',
'size' => 16,
'angle' => 0,
'color' => '#000000FF',
'stroke_mode' => 'outline',
'stroke_color' => '#000000FF',
'outline_top' => 0,
'outline_right' => 0,
'outline_bottom' => 0,
'outline_left' => 0,
'shadow_x_offset' => 1,
'shadow_y_offset' => 1,
'shadow_width' => 0,
'shadow_height' => 0,
],
'layout' => [
'padding_top' => 0,
'padding_right' => 0,
'padding_bottom' => 0,
'padding_left' => 0,
'x_pos' => 'center',
'y_pos' => 'center',
'x_offset' => 0,
'y_offset' => 0,
'background_color' => NULL,
'overflow_action' => 'extend',
'extended_color' => NULL,
],
'text' => [
'strip_tags' => TRUE,
'decode_entities' => TRUE,
'maximum_width' => 0,
'fixed_width' => FALSE,
'align' => 'left',
'line_spacing' => 0,
'case_format' => '',
'maximum_chars' => NULL,
'excess_chars_text' => $this
->t('…'),
],
'text_string' => $this
->t('Preview'),
], parent::defaultConfiguration());
}