You are here

onlyone.install in Allow a content type only once (Only One) 8

Same filename and directory in other branches
  1. 7 onlyone.install

Install, update and uninstall functions.

File

onlyone.install
View source
<?php

/**
 * @file
 * Install, update and uninstall functions.
 */

/**
 * Set the default value for the new variable onlyone_redirect.
 *
 * @see https://www.drupal.org/project/onlyone/issues/3104005
 */
function onlyone_update_8001() {
  \Drupal::service('config.factory')
    ->getEditable('onlyone.settings')
    ->set('onlyone_redirect', TRUE)
    ->save();
}

Functions

Namesort descending Description
onlyone_update_8001 Set the default value for the new variable onlyone_redirect.