本文整理汇总了PHP中task::get_link方法的典型用法代码示例。如果您正苦于以下问题:PHP task::get_link方法的具体用法?PHP task::get_link怎么用?PHP task::get_link使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类task
的用法示例。
在下文中一共展示了task::get_link方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: timeUnit
*/
define("NO_REDIRECT", 1);
require_once "../alloc.php";
//usleep(1000);
$t = timeSheetItem::parse_time_string($_REQUEST["time_item"]);
$timeUnit = new timeUnit();
$units = $timeUnit->get_assoc_array("timeUnitID", "timeUnitLabelA");
$timeSheetItemMultiplier = new meta("timeSheetItemMultiplier");
$tsims = $timeSheetItemMultiplier->get_list();
foreach ($t as $k => $v) {
if ($v) {
if ($k == "taskID") {
$task = new task();
$task->set_id($v);
if ($task->select()) {
$v = $task->get_id() . " " . $task->get_link();
} else {
$v = "Task " . $v . " not found.";
}
} else {
if ($k == "unit") {
$v = $units[$v];
} else {
if ($k == "multiplier") {
$v = $tsims[sprintf("%0.2f", $v)]["timeSheetItemMultiplierName"];
}
}
}
$rtn[$k] = $v;
}
}
示例2: get_list
public static function get_list($_FORM = array())
{
// Two modes, 1: get all comments for an entity, eg a task
if ($_FORM["entity"] && in_array($_FORM["entity"], array("project", "client", "task", "timeSheet")) && $_FORM["entityID"]) {
$e = new $_FORM["entity"]();
$e->set_id($_FORM["entityID"]);
if ($e->select()) {
// this ensures that the user can read the entity
return comment::util_get_comments_array($_FORM["entity"], $_FORM["entityID"], $_FORM);
}
// Or 2: get all starred comments
} else {
if ($_FORM["starred"]) {
$filter = comment::get_list_filter($_FORM);
if (is_array($filter) && count($filter)) {
$filter = " WHERE " . implode(" AND ", $filter);
}
$q = "SELECT comment.*, commentCreatedUser as personID, clientContact.clientContactName\n FROM comment \n LEFT JOIN clientContact on comment.commentCreatedUserClientContactID = clientContact.clientContactID\n " . $filter . " \n ORDER BY commentCreatedTime";
$db = new db_alloc();
$db->query($q);
$people =& get_cached_table("person");
while ($row = $db->next_record()) {
$e = new $row["commentMaster"]();
$e->set_id($row["commentMasterID"]);
$e->select();
$row["entity_link"] = $e->get_link();
$row["personID"] and $row["person"] = $people[$row["personID"]]["name"];
$row["clientContactName"] and $row["person"] = $row["clientContactName"];
$rows[] = $row;
}
has("timeSheetItem") and $tsi_rows = timeSheetItem::get_timeSheetItemComments(null, true);
foreach ((array) $tsi_rows as $row) {
$t = new task();
$t->set_id($row["taskID"]);
$t->select();
$row["entity_link"] = $t->get_link();
$row["commentMaster"] = "Task";
$row["commentMasterID"] = $row["taskID"];
$row["commentCreatedTime"] = $row["date"];
$row["personID"] and $row["person"] = $people[$row["personID"]]["name"];
$rows[] = $row;
}
return (array) $rows;
}
}
}