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


PHP columns_get_all函数代码示例

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


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

示例1: access_ensure_project_level

}
# only MANAGERS can set global defaults.for a project
if ($f_manage_page && $t_dst_project_id != ALL_PROJECTS) {
    access_ensure_project_level(MANAGER, $t_dst_project_id);
}
# user should only be able to set columns for a project that is accessible.
if ($t_dst_project_id != ALL_PROJECTS) {
    access_ensure_project_level(VIEWER, $t_dst_project_id);
}
# Calculate the user id to set the configuration for.
if ($f_manage_page) {
    $t_user_id = NO_USER;
} else {
    $t_user_id = auth_get_current_user_id();
}
$t_all_columns = columns_get_all();
$t_default = null;
$t_view_issues_page_columns = config_get('view_issues_page_columns', $t_default, $t_user_id, $t_src_project_id);
$t_view_issues_page_columns = columns_remove_invalid($t_view_issues_page_columns, $t_all_columns);
$t_print_issues_page_columns = config_get('print_issues_page_columns', $t_default, $t_user_id, $t_src_project_id);
$t_print_issues_page_columns = columns_remove_invalid($t_print_issues_page_columns, $t_all_columns);
$t_csv_columns = config_get('csv_columns', $t_default, $t_user_id, $t_src_project_id);
$t_csv_columns = columns_remove_invalid($t_csv_columns, $t_all_columns);
$t_excel_columns = config_get('excel_columns', $t_default, $t_user_id, $t_src_project_id);
$t_excel_columns = columns_remove_invalid($t_excel_columns, $t_all_columns);
config_set('view_issues_page_columns', $t_view_issues_page_columns, $t_user_id, $t_dst_project_id);
config_set('print_issues_page_columns', $t_print_issues_page_columns, $t_user_id, $t_dst_project_id);
config_set('csv_columns', $t_csv_columns, $t_user_id, $t_dst_project_id);
config_set('excel_columns', $t_excel_columns, $t_user_id, $t_dst_project_id);
form_security_purge('manage_columns_copy');
$t_redirect_url = $f_manage_page ? 'manage_config_columns_page.php' : 'account_manage_columns_page.php';
开发者ID:kaos,项目名称:mantisbt,代码行数:31,代码来源:manage_columns_copy.php

示例2: custom_function_default_get_columns_to_view

/**
 * returns an array of the column names to be displayed.
 * The column names to use are those of the field names in the bug table.
 * In addition, you can use the following:
 * - "selection" for selection checkboxes.
 * - "edit" for icon to open the edit page.
 * - "custom_xxxx" were xxxx is the name of the custom field that is valid for the
 *   current project.  In case of "All Projects, the field will be empty where it is
 *   not applicable.
 *
 * @param integer $p_columns_target See COLUMNS_TARGET_* in constant_inc.php.
 * @param integer $p_user_id        The user id or null for current logged in user.
 * @return array
 */
function custom_function_default_get_columns_to_view($p_columns_target = COLUMNS_TARGET_VIEW_PAGE, $p_user_id = null)
{
    $t_project_id = helper_get_current_project();
    if ($p_columns_target == COLUMNS_TARGET_CSV_PAGE) {
        $t_columns = config_get('csv_columns', '', $p_user_id, $t_project_id);
    } else {
        if ($p_columns_target == COLUMNS_TARGET_EXCEL_PAGE) {
            $t_columns = config_get('excel_columns', '', $p_user_id, $t_project_id);
        } else {
            if ($p_columns_target == COLUMNS_TARGET_VIEW_PAGE) {
                $t_columns = config_get('view_issues_page_columns', '', $p_user_id, $t_project_id);
            } else {
                $t_columns = config_get('print_issues_page_columns', '', $p_user_id, $t_project_id);
            }
        }
    }
    $t_columns = columns_remove_invalid($t_columns, columns_get_all($t_project_id));
    return $t_columns;
}
开发者ID:gtn,项目名称:mantisbt,代码行数:33,代码来源:custom_function_api.php

示例3: require_api

require_api('file_api.php');
require_api('form_api.php');
require_api('helper_api.php');
require_api('html_api.php');
require_api('lang_api.php');
require_api('print_api.php');
$t_manage_page = defined('MANAGE_COLUMNS');
$t_account_page = defined('ACCOUNT_COLUMNS');
$t_project_id = helper_get_current_project();
# Calculate the user id to set the configuration for.
if ($t_manage_page) {
    $t_user_id = NO_USER;
} else {
    $t_user_id = auth_get_current_user_id();
}
$t_columns = columns_get_all($t_project_id);
$t_all = implode(', ', $t_columns);
$t_columns = helper_get_columns_to_view(COLUMNS_TARGET_CSV_PAGE, false, $t_user_id);
$t_csv = implode(', ', $t_columns);
$t_columns = helper_get_columns_to_view(COLUMNS_TARGET_VIEW_PAGE, false, $t_user_id);
$t_view_issues = implode(', ', $t_columns);
$t_columns = helper_get_columns_to_view(COLUMNS_TARGET_PRINT_PAGE, false, $t_user_id);
$t_print_issues = implode(', ', $t_columns);
$t_columns = helper_get_columns_to_view(COLUMNS_TARGET_EXCEL_PAGE, false, $t_user_id);
$t_excel = implode(', ', $t_columns);
?>

<div id="manage-columns-div" class="form-container">
	<form id="manage-columns-form" method="post" action="manage_config_columns_set.php">
		<fieldset class="has-required">
			<legend><span><?php 
开发者ID:Kirill,项目名称:mantisbt,代码行数:31,代码来源:manage_columns_inc.php

示例4: custom_function_default_get_columns_to_view

function custom_function_default_get_columns_to_view($p_columns_target = COLUMNS_TARGET_VIEW_PAGE, $p_user_id = null)
{
    $t_project_id = helper_get_current_project();
    $t_boo = true;
    $t_config_table = db_get_table('mantis_config_table');
    if ($p_columns_target == COLUMNS_TARGET_CSV_PAGE) {
        $t_columns = config_get('csv_columns', '', $p_user_id, $t_project_id);
    } else {
        if ($p_columns_target == COLUMNS_TARGET_EXCEL_PAGE) {
            $t_columns = config_get('excel_columns', '', $p_user_id, $t_project_id);
        } else {
            if ($p_columns_target == COLUMNS_TARGET_VIEW_PAGE) {
                $t_columns = config_get('view_issues_page_columns', '', $p_user_id, $t_project_id);
            } else {
                if ($p_columns_target == COLUMNS_TARGET_PRINT_PAGE) {
                    $t_columns = config_get('print_issues_page_columns', '', $p_user_id, $t_project_id);
                } else {
                    $t_columns = helper_user_exists($p_user_id, $t_config_table) ? config_get('home_view_columns', '', $p_user_id, $t_project_id) : columns_get_custom_fields($t_project_id);
                    $t_boo = false;
                }
            }
        }
    }
    $t_columns_get = $t_boo ? columns_get_all($t_project_id) : columns_get_custom_fields($t_project_id);
    $t_columns = columns_remove_invalid($t_columns, $t_columns_get);
    return $t_columns;
}
开发者ID:khinT,项目名称:mantisbt-master,代码行数:27,代码来源:custom_function_api.php


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