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


PHP Activity::listActions方法代码示例

本文整理汇总了PHP中Activity::listActions方法的典型用法代码示例。如果您正苦于以下问题:PHP Activity::listActions方法的具体用法?PHP Activity::listActions怎么用?PHP Activity::listActions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Activity的用法示例。


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

示例1: foreach

        ?>
	  </div>
	</form>

	<?php 
    } else {
        echo 'Uh Oh, thats not the right action type';
    }
} else {
    ?>
<div class="page-header">
<h1>Edit Action <button type="button" onclick="newAction()" class="btn btn-primary"><i class="fa fa-plus"></i> Add Action</button></h1>
</div>
	<?php 
    // Show list of ACT and STAT
    $actionInfo = Activity::listActions();
    echo '<table class="table table-hover"><thead>';
    if ($user->inRole('administrator')) {
        $editHead = '<th class="col-md-1"></th>';
    }
    echo '<tr><th class="col-md-1">ID</th><th class="col-md-1">Type</th><th class="col-md-1">Name</th><th class="col-md-1">Title</th><th class="col-md-5">Description</th>' . $editHead . '</tr></thead>';
    foreach ($actionInfo as $key => $value) {
        if ($user->inRole('administrator')) {
            $edit = '<td class="col-md-1"><a href="?id=' . $value['id'] . '">edit</a></td>';
        }
        echo '<tr><td class="col-md-1">' . $value['id'] . '</td><td class="col-md-1">' . $value['type'] . '</td><td class="col-md-1">' . $value['name'] . '</td><td class="col-md-2">' . $value['title'] . '</td><td class="col-md-4">' . $value['description'] . '</td>' . $edit . '</tr>';
        unset($ruleAllow);
    }
    echo '</table>';
}
?>
开发者ID:ben-garside,项目名称:XCP,代码行数:31,代码来源:actionManager.php

示例2:

        $actDataTo = Activity::splitStage($stages[1], ",");
        $pipeline = $stages[2];
        $out = Activity::getAction($actDataFrom['activity'], $actDataFrom['status'], $actDataTo['activity'], $actDataTo['status'], $pipeline);
        break;
    case 'getActionType':
        $action = $key;
        $out = Activity::getActionType($action);
        break;
    case 'getActivities':
        $out = Activity::listActivities();
        break;
    case 'getStatuses':
        $out = Activity::listStatuses($key);
        break;
    case 'getActions':
        $out = Activity::listActions();
        break;
    case 'getNewAction':
        $out = Activity::getNewAction();
        break;
    default:
        $out = false;
        break;
}
if ($out) {
    if (is_array($out)) {
        print json_encode($out);
    } else {
        echo $out;
    }
}
开发者ID:ben-garside,项目名称:XCP,代码行数:31,代码来源:activity.data.lookup.php

示例3:

}
?>
	  </select>
	  </div>
	  <div class="col-sm-1">
	  <p id="ok_xx" style="color: #3C763D; text-align: center; padding-top: 7px; display: none;"><i class="fa fa-check"></i> Updated</p>
	  <p id="err_xx"style="color: #A94442; text-align: center; padding-top: 7px; display: none;"><i class="fa fa-times"></i> Error</p>
	  </div>
	</div>
	<div class="form-group">
	  <label class="control-label col-sm-3 " for="action_xx">Action</label>
	  <div class="col-sm-4">
	  <select class="form-control action" id="action_xx" aria-describedby="inputSuccess2Status">
	  	<option value="" selected >None</option>
			<?php 
$activities = Activity::listActions();
foreach ($activities as $key => $value) {
    echo '<option value="' . $value['id'] . '">' . $value['id'] . ' - ' . $value['name'] . '</option>';
}
?>
	  </select>
	  </div>
	</div>
	<div class="form-group">
		<div class="col-sm-offset-3 col-sm-10">
			<div class="checkbox">
				<label>
				<input id="assign_xx" type="checkbox" value="" <?php 
if ($rule['assign'] == 1) {
    echo " checked";
}
开发者ID:ben-garside,项目名称:XCP,代码行数:31,代码来源:stagemanager.php


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