function _color_save_stylesheet

Same name in other branches
  1. 7.x modules/color/color.module \_color_save_stylesheet()
  2. 9 core/modules/color/color.module \_color_save_stylesheet()

Saves the rewritten stylesheet to disk.

1 call to _color_save_stylesheet()
color_scheme_form_submit in core/modules/color/color.module
Form submission handler for color_scheme_form().

File

core/modules/color/color.module, line 593

Code

function _color_save_stylesheet($file, $style, &$paths) {
    $filepath = \Drupal::service('file_system')->saveData($style, $file, FileSystemInterface::EXISTS_REPLACE);
    $paths['files'][] = $filepath;
    // Set standard file permissions for webserver-generated files.
    \Drupal::service('file_system')->chmod($file);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.