kb-8.x-1.x-dev/modules/kb_h5p/kb_h5p.install

modules/kb_h5p/kb_h5p.install
<?php
/**
 * Created by PhpStorm.
 * User: cerium
 * Date: 2/10/18
 * Time: 5:34 PM
 */

/**
 * Implements hook_install().
 *
 * This will install/reinstall all of the defaults for this module - if you are using custom settings,
 * please CLONE views and groups and use these as a template.
 */
function kb_h5p_install() {
    \Drupal::service('config.installer')->installDefaultConfig('module', 'kb_h5p');

    $module_cfg = \Drupal::configFactory()->getEditable('kb_h5p.views.view.kb');
    $settings = \Drupal::configFactory()->getEditable('views.view.kb');
    $settings->setData($module_cfg->get())->save();
    $module_cfg->delete();

    drupal_set_message(t('The KnowledgeBase H5P Module has been installed.'), 'status', TRUE);
}

/**
 * Implements hook_uninstall().
 */
function kb_h5p_uninstall() {
    \Drupal::service('config.manager')->uninstall('module', 'kb_h5p');
}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc