当前位置: 首页>>代码示例>>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;未经允许,请勿转载。