You are here

function textimage_image_style_presave in Textimage 8.4

Same name and namespace in other branches
  1. 8.3 textimage.module \textimage_image_style_presave()

Implements hook_image_style_presave().

Deals with Textimage third party settings.

File

./textimage.module, line 166
Textimage - Provides text to image manipulations.

Code

function textimage_image_style_presave(ImageStyleInterface $style) {

  // If Textimage TPSs are not yet set, set defaults.
  if (!in_array('textimage', $style
    ->getThirdPartyProviders())) {
    $style
      ->setThirdPartySetting('textimage', 'uri_scheme', \Drupal::service('config.factory')
      ->get('system.file')
      ->get('default_scheme'));
  }
}