Version 1
[yaffs-website] / web / modules / contrib / image_widget_crop / modules / image_widget_crop_examples / image_widget_crop_examples.install
1 <?php
2 /**
3  * @file
4  * Contains image_widget_crop_example.install.
5  */
6
7 /**
8  * Implements hook_install().
9  */
10 function image_widget_crop_examples_install() {
11   // Set the front page.
12   \Drupal::configFactory()
13     ->getEditable('system.site')
14     ->set('page.front', '/image_widget_crop_examples')
15     ->save();
16
17   // Set the IWC general settings.
18   \Drupal::configFactory()
19     ->getEditable('image_widget_crop.settings')
20     ->set('settings.crop_preview_image_style', 'crop_thumbnail')
21     ->set('settings.show_default_crop', TRUE)
22     ->set('settings.warn_multiple_usages', FALSE)
23     ->set('settings.crop_list', [
24       'crop_16_9' => 'crop_16_9',
25       'crop_4_3' => 'crop_4_3',
26       'crop_free_ratio' => 'crop_free_ratio',
27     ])
28     ->save();
29 }