当前位置: 首页>>代码示例>>PHP>>正文


PHP drupal_set_content函数代码示例

本文整理汇总了PHP中drupal_set_content函数的典型用法代码示例。如果您正苦于以下问题:PHP drupal_set_content函数的具体用法?PHP drupal_set_content怎么用?PHP drupal_set_content使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了drupal_set_content函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: install_task_list

/**
 * Add the installation task list to the current page.
 */
function install_task_list($active = NULL)
{
    // Default list of tasks.
    $tasks = array('profile-select' => st('Choose profile'), 'locale-select' => st('Choose language'), 'requirements' => st('Verify requirements'), 'database' => st('Set up database'), 'profile-install-batch' => st('Install profile'), 'locale-initial-batch' => st('Set up translations'), 'configure' => st('Configure site'));
    $profiles = install_find_profiles();
    $profile = isset($_GET['profile']) && isset($profiles[$_GET['profile']]) ? $_GET['profile'] : '.';
    $locales = install_find_locales($profile);
    // If we have only one profile, remove 'Choose profile'
    // and rename 'Install profile'.
    if (count($profiles) == 1) {
        unset($tasks['profile-select']);
        $tasks['profile-install-batch'] = st('Install site');
    }
    // Add tasks defined by the profile.
    if ($profile) {
        $function = $profile . '_profile_task_list';
        if (function_exists($function)) {
            $result = $function();
            if (is_array($result)) {
                $tasks += $result;
            }
        }
    }
    if (count($locales) < 2 || empty($_GET['locale']) || $_GET['locale'] == 'en') {
        // If not required, remove translation import from the task list.
        unset($tasks['locale-initial-batch']);
    } else {
        // If required, add remaining translations import task.
        $tasks += array('locale-remaining-batch' => st('Finish translations'));
    }
    // Add finished step as the last task.
    $tasks += array('finished' => st('Finished'));
    // Let the theming function know that 'finished' and 'done'
    // include everything, so every step is completed.
    if (in_array($active, array('finished', 'done'))) {
        $active = NULL;
    }
    drupal_set_content('left', theme_task_list($tasks, $active));
}
开发者ID:alexismb5,项目名称:ckan-drupal,代码行数:42,代码来源:install.php

示例2: update_task_list

/**
 * Add the update task list to the current page.
 */
function update_task_list($active = NULL)
{
    // Default list of tasks.
    $tasks = array('info' => 'Overview', 'select' => 'Select updates', 'run' => 'Run updates', 'finished' => 'Review log');
    drupal_set_content('left', theme('task_list', $tasks, $active));
}
开发者ID:c4rl,项目名称:6,代码行数:9,代码来源:update.php


注:本文中的drupal_set_content函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。