當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Workflow::getPermissionList方法代碼示例

本文整理匯總了PHP中Workflow::getPermissionList方法的典型用法代碼示例。如果您正苦於以下問題:PHP Workflow::getPermissionList方法的具體用法?PHP Workflow::getPermissionList怎麽用?PHP Workflow::getPermissionList使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Workflow的用法示例。


在下文中一共展示了Workflow::getPermissionList方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: get_permissions

function get_permissions($workflow_id)
{
    $selected_permission_list = Workflow::getPermissionList($workflow_id);
    $returnJSON['selected_permission_list'] = $selected_permission_list;
    $returnJSON['workflow_id'] = $workflow_id;
    echo json_encode($returnJSON);
}
開發者ID:0x27,項目名稱:apiary-project,代碼行數:7,代碼來源:workspace.functions.php

示例2: get_permission_map

function get_permission_map($workflow_id)
{
    $selected_permission_list = Workflow::getPermissionList($workflow_id);
    if (is_array($selected_permission_list)) {
        foreach ($selected_permission_list as $permission_string) {
            $permission_map[$permission_string] = true;
        }
    }
    return $permission_map;
}
開發者ID:0x27,項目名稱:apiary-project,代碼行數:10,代碼來源:analyze.functions.php

示例3: workflow

function workflow($workflow_id)
{
    $permission_name_list = Permission::getPermissionNameList();
    $drupal_user_name_list = Workflow::getDrupalUserList();
    //we can modify this to only return drupal users with certain permissions
    $drupal_user_count = sizeof($drupal_user_name_list);
    $object_pool_name_list = Object_Pool::getObjectPoolNameList();
    $object_pool_count = sizeof($object_pool_name_list);
    $workflow_name = '';
    $workflow_description = '';
    $object_pool_id = '';
    $create_button_style = '';
    $update_button_style = '';
    if ($workflow_id != '0') {
        if (Workflow::workflow_id_exists($workflow_id)) {
            $workflow_id = $workflow_id;
            $workflow_record = Workflow::get($workflow_id);
            $workflow_name = $workflow_record['workflow_name'];
            $workflow_description = $workflow_record['workflow_description'];
            $object_pool_id = $workflow_record['object_pool_id'];
            $create_button_style = ' style="display:none;"';
            $selected_permission_list = Workflow::getPermissionList($workflow_id);
            $selected_user_list = Workflow_Users::getUserList($workflow_id);
            $selected_object_pool = Object_Pool::getNameFromID($object_pool_id);
        }
    } else {
        $update_button_style = ' style="display:none;"';
        $selected_user_list = array($user->name);
    }
    $update_button = '<input type="button" id="update_workflow_btn" name="update_workflow_btn"' . $update_button_style . ' onClick="update_workflow();" value="Update Workflow" />';
    $create_button = '<input type="button" id="create_workflow_btn" name="create_workflow_btn"' . $create_button_style . ' onClick="create_workflow();" value="Create Workflow" />';
    $permission_checkboxes = generateWorkflowPermissionCheckboxes($permission_name_list, $selected_permission_list);
    $drupal_user_names_combobox = generateDrupalUserNamesComboBox($drupal_user_name_list, $selected_user_list);
    $object_pool_name_combobox = generateObjectPoolNameComboBox($object_pool_name_list, $selected_object_pool);
    $server_base = variable_get('apiary_research_base_url', 'http://localhost');
    $home_link = '<p><h3><a href="' . $server_base . '/drupal">Home</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="' . $server_base . '/drupal/apiary/admin">Administer Apiary</a></h3></p>';
    echo $home_link . '
  <div id="workflow_content">
  <h3>Workflow</h3>
    <label for="workflow_name">Workflow Name:</label>
   <br/>
    <input type="text" name="workflow_name" id="workflow_name" value="' . $workflow_name . '" style="width:100px" />
   <p/>
    <label for="workflow_description">Workflow Description:</label>
   <br/>
    <input type="text" name="workflow_description" id="workflow_description" value="' . $workflow_description . '" style="width:100px" />
   <p/>
    <label>Permissions:</label>
   <br/>
    <label>Users with access to this workflow are allowed the following permissions:</label>
   <p/>
   ' . $permission_checkboxes . '
   <p/>
    <label>Select users allowed to access this workflow.</label>
   <div id="drupal_users_cbox">
    ' . $drupal_user_names_combobox . ' <a href="#" class="overlay_drupal_user">create new user</a>
   </div>
   <p/>
    <label>Strategy:</label>
    <br/>
   <div id="object_pool_cbox">
    <label>Object Pool: </label>' . $object_pool_name_combobox . ' <a href="#" class="overlay_object_pool">create new object pool</a>
   </div>
   <br/>
   <p/>
    <label>Priority</label>
   <p/>
    <label>Current Queue</label>
   <p/>
    ' . $create_button . '' . $update_button . '
   <br/>
  </div>
  <div class="nothing" id="variables" name="variables" style="display:none;">
  	<input type="hidden" name="drupal_user_count" id="drupal_user_count" value="' . $drupal_user_count . '"/>
  	<input type="hidden" name="object_pool_count" id="object_pool_count"  value="' . $object_pool_count . '"/>
</div>
';
}
開發者ID:0x27,項目名稱:apiary-project,代碼行數:78,代碼來源:workflow.functions.php


注:本文中的Workflow::getPermissionList方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。