本文整理汇总了PHP中project_cache_row函数的典型用法代码示例。如果您正苦于以下问题:PHP project_cache_row函数的具体用法?PHP project_cache_row怎么用?PHP project_cache_row使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了project_cache_row函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: mc_projects_get_user_accessible
/**
* Get all projects accessible by the given user.
*
* @param string $p_username The name of the user trying to access the project list.
* @param string $p_password The password of the user.
* @return Array suitable to be converted into a ProjectDataArray
*/
function mc_projects_get_user_accessible($p_username, $p_password)
{
$t_user_id = mci_check_login($p_username, $p_password);
if ($t_user_id === false) {
return mci_soap_fault_login_failed();
}
if (!mci_has_readonly_access($t_user_id)) {
return mci_soap_fault_access_denied($t_user_id);
}
$t_lang = mci_get_user_lang($t_user_id);
$t_result = array();
foreach (user_get_accessible_projects($t_user_id) as $t_project_id) {
$t_project_row = project_cache_row($t_project_id);
$t_project = array();
$t_project['id'] = $t_project_id;
$t_project['name'] = $t_project_row['name'];
$t_project['status'] = mci_enum_get_array_by_id($t_project_row['status'], 'project_status', $t_lang);
$t_project['enabled'] = $t_project_row['enabled'];
$t_project['view_state'] = mci_enum_get_array_by_id($t_project_row['view_state'], 'project_view_state', $t_lang);
$t_project['access_min'] = mci_enum_get_array_by_id($t_project_row['access_min'], 'access_levels', $t_lang);
$t_project['file_path'] = array_key_exists('file_path', $t_project_row) ? $t_project_row['file_path'] : "";
$t_project['description'] = array_key_exists('description', $t_project_row) ? $t_project_row['description'] : "";
$t_project['subprojects'] = mci_user_get_accessible_subprojects($t_user_id, $t_project_id, $t_lang);
$t_result[] = $t_project;
}
return $t_result;
}
示例2: mci_user_get_accessible_subprojects
/**
* Gets the sub-projects that are accessible to the specified user / project.
* @param integer $p_user_id User id.
* @param integer $p_parent_project_id Parent Project id.
* @param string $p_lang Language string.
* @return array
*/
function mci_user_get_accessible_subprojects($p_user_id, $p_parent_project_id, $p_lang = null)
{
if ($p_lang === null) {
$t_lang = mci_get_user_lang($p_user_id);
} else {
$t_lang = $p_lang;
}
$t_result = array();
foreach (user_get_accessible_subprojects($p_user_id, $p_parent_project_id) as $t_subproject_id) {
$t_subproject_row = project_cache_row($t_subproject_id);
$t_subproject = array();
$t_subproject['id'] = $t_subproject_id;
$t_subproject['name'] = $t_subproject_row['name'];
$t_subproject['status'] = mci_enum_get_array_by_id($t_subproject_row['status'], 'project_status', $t_lang);
$t_subproject['enabled'] = $t_subproject_row['enabled'];
$t_subproject['view_state'] = mci_enum_get_array_by_id($t_subproject_row['view_state'], 'project_view_state', $t_lang);
$t_subproject['access_min'] = mci_enum_get_array_by_id($t_subproject_row['access_min'], 'access_levels', $t_lang);
$t_subproject['file_path'] = array_key_exists('file_path', $t_subproject_row) ? $t_subproject_row['file_path'] : '';
$t_subproject['description'] = array_key_exists('description', $t_subproject_row) ? $t_subproject_row['description'] : '';
$t_subproject['subprojects'] = mci_user_get_accessible_subprojects($p_user_id, $t_subproject_id, $t_lang);
$t_result[] = $t_subproject;
}
return $t_result;
}
示例3: project_get_row
function project_get_row($p_project_id, $p_trigger_errors = true)
{
return project_cache_row($p_project_id, $p_trigger_errors);
}
示例4: project_get_row
function project_get_row($p_project_id)
{
return project_cache_row($p_project_id);
}