Unverified Commit e1e3038e authored by Mateu Aguiló Bosch's avatar Mateu Aguiló Bosch
Browse files

Issue #3310852 by e0ipso: Create a fancier widget selector with more context

parent 80df534a
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -133,3 +133,19 @@ function widget_type_update_8105(&$sandbox) {
    );
  }
}

/**
 * Install image style for new fancy selector.
 */
function widget_type_update_8106(&$sandbox) {
  $path = implode(DIRECTORY_SEPARATOR, [
    \Drupal::root(),
    \Drupal::service('extension.list.module')->getPath('widget_type'),
    \Drupal\Core\Config\InstallStorage::CONFIG_INSTALL_DIRECTORY,
  ]);
  $source = new FileStorage($path);
  $active_storage = \Drupal::service('config.storage');
  $name = 'image.style.widget_type_small_16_9';
  $data = $source->read($name);
  $active_storage->write($name, $data);
}