You are here

function add_to_head_set_settings in Add To Head 8

Helper to set settings back to the Database

Parameters

$settings array Array of profiles to store.:

2 calls to add_to_head_set_settings()
AddToHeadDeleteProfileForm::submitForm in src/Form/AddToHeadDeleteProfileForm.php
Form submission handler.
AddToHeadProfileForm::submitForm in src/Form/AddToHeadProfileForm.php
Form submission handler.

File

./add_to_head.module, line 36
Add To Head allows arbitrary insertion of code into the head of the page based on path selection.

Code

function add_to_head_set_settings($settings) {
  \Drupal::configFactory()
    ->getEditable('add_to_head.settings')
    ->set('add_to_head_profiles', $settings)
    ->save();
}