Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/drupal/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
更改Drupal安装配置文件中的颜色模式_Drupal_Drupal Distributions - Fatal编程技术网

更改Drupal安装配置文件中的颜色模式

更改Drupal安装配置文件中的颜色模式,drupal,drupal-distributions,Drupal,Drupal Distributions,如何更改Drupal安装配置文件中使用的颜色配置文件?我已经安装了颜色-模块,可以在外观-设置-*主题*我的颜色模式下进行配置,从而生成一个包含所有颜色值的$info数组。但是我如何将其放置在我的安装配置文件中,以便在默认情况下进行安装 我在我的安装配置文件中添加了一个任务,并将其链接到该功能。但很明显,这里缺少了一些东西 $tasks['_create_color']['display_name'] = 'Set the typical color on each platform'; $ta

如何更改Drupal安装配置文件中使用的颜色配置文件?我已经安装了
颜色
-模块,可以在
外观-设置-*主题*
我的颜色模式下进行配置,从而生成一个包含所有颜色值的
$info
数组。但是我如何将其放置在我的安装配置文件中,以便在默认情况下进行安装

我在我的安装配置文件中添加了一个任务,并将其链接到该功能。但很明显,这里缺少了一些东西

$tasks['_create_color']['display_name'] = 'Set the typical color on each platform';
$tasks['_create_color']['display'] = 0;

function _create_color() {
    $info = array(
    'schemes' => array(
    'default' => array(
      'title' => t('Blue Lagoon (default)'),
      'colors' => array(
        'top' => '#97279b',
        'bottom' => '#97279b',
        'footer' => '#97279b',
        'link' => '#97279b',
      )
    )));
}

有人有意见吗

我发现自己有一个完美的功能来更改使用过的颜色配置文件

function _create_color() {
    $theme = 'bartik';
    $scheme  = 'firehouse';

    $fform = array();
    $fform_state = array();

    $fform_state['build_info']['args'][0] = $theme;
    $fform = system_theme_settings($fform, $fform_state, $theme);

    color_form_system_theme_settings_alter($fform, $fform_state);

    $fform_state['values']['theme'] = $theme;
    $fform_state['values']['info'] = color_get_info($theme);
    $fform_state['values']['palette'] = $fform_state['values']['info']['schemes'][$scheme]['colors'];
    $fform_state['values']['scheme'] = $scheme;

    color_scheme_form_submit($fform, $fform_state); 
}
在安装配置文件中放置在任务中时,它会起作用