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


PHP project::get_name方法代码示例

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


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

示例1: project

 function update_search_index_doc(&$index)
 {
     $p =& get_cached_table("person");
     $personID = $this->get_value("personID");
     $person_field = $personID . " " . $p[$personID]["username"] . " " . $p[$personID]["name"];
     $managerID = $this->get_value("approvedByManagerPersonID");
     $manager_field = $managerID . " " . $p[$managerID]["username"] . " " . $p[$managerID]["name"];
     $adminID = $this->get_value("approvedByAdminPersonID");
     $admin_field = $adminID . " " . $p[$adminID]["username"] . " " . $p[$adminID]["name"];
     $tf_field = $this->get_value("recipient_tfID") . " " . tf::get_name($this->get_value("recipient_tfID"));
     if ($this->get_value("projectID")) {
         $project = new project();
         $project->set_id($this->get_value("projectID"));
         $project->select();
         $projectName = $project->get_name();
         $projectShortName = $project->get_name(array("showShortProjectLink" => true));
         $projectShortName && $projectShortName != $projectName and $projectName .= " " . $projectShortName;
     }
     $q = prepare("SELECT dateTimeSheetItem, taskID, description, comment, commentPrivate \n                    FROM timeSheetItem \n                   WHERE timeSheetID = %d \n                ORDER BY dateTimeSheetItem ASC", $this->get_id());
     $db = new db_alloc();
     $db->query($q);
     while ($r = $db->row()) {
         $desc .= $br . $r["dateTimeSheetItem"] . " " . $r["taskID"] . " " . $r["description"] . "\n";
         $r["comment"] && $r["commentPrivate"] or $desc .= $r["comment"] . "\n";
         $br = "\n";
     }
     $doc = new Zend_Search_Lucene_Document();
     $doc->addField(Zend_Search_Lucene_Field::Keyword('id', $this->get_id()));
     $doc->addField(Zend_Search_Lucene_Field::Text('project', $projectName, "utf-8"));
     $doc->addField(Zend_Search_Lucene_Field::Text('pid', $this->get_value("projectID"), "utf-8"));
     $doc->addField(Zend_Search_Lucene_Field::Text('creator', $person_field, "utf-8"));
     $doc->addField(Zend_Search_Lucene_Field::Text('desc', $desc, "utf-8"));
     $doc->addField(Zend_Search_Lucene_Field::Text('status', $this->get_value("status"), "utf-8"));
     $doc->addField(Zend_Search_Lucene_Field::Text('tf', $tf_field, "utf-8"));
     $doc->addField(Zend_Search_Lucene_Field::Text('manager', $manager_field, "utf-8"));
     $doc->addField(Zend_Search_Lucene_Field::Text('admin', $admin_field, "utf-8"));
     $doc->addField(Zend_Search_Lucene_Field::Text('dateManager', str_replace("-", "", $this->get_value("dateSubmittedToManager")), "utf-8"));
     $doc->addField(Zend_Search_Lucene_Field::Text('dateAdmin', str_replace("-", "", $this->get_value("dateSubmittedToAdmin")), "utf-8"));
     $doc->addField(Zend_Search_Lucene_Field::Text('dateFrom', str_replace("-", "", $this->get_value("dateFrom")), "utf-8"));
     $doc->addField(Zend_Search_Lucene_Field::Text('dateTo', str_replace("-", "", $this->get_value("dateTo")), "utf-8"));
     $index->addDocument($doc);
 }
开发者ID:cjbayliss,项目名称:alloc,代码行数:42,代码来源:timeSheet.inc.php

示例2: project

 function update_search_index_doc(&$index)
 {
     $p =& get_cached_table("person");
     $creatorID = $this->get_value("creatorID");
     $creator_field = $creatorID . " " . $p[$creatorID]["username"] . " " . $p[$creatorID]["name"];
     $closerID = $this->get_value("closerID");
     $closer_field = $closerID . " " . $p[$closerID]["username"] . " " . $p[$closerID]["name"];
     $personID = $this->get_value("personID");
     $person_field = $personID . " " . $p[$personID]["username"] . " " . $p[$personID]["name"];
     $managerID = $this->get_value("managerID");
     $manager_field = $managerID . " " . $p[$managerID]["username"] . " " . $p[$managerID]["name"];
     $taskModifiedUser = $this->get_value("taskModifiedUser");
     $taskModifiedUser_field = $taskModifiedUser . " " . $p[$taskModifiedUser]["username"] . " " . $p[$taskModifiedUser]["name"];
     $status = $this->get_value("taskStatus");
     if ($this->get_value("projectID")) {
         $project = new project();
         $project->set_id($this->get_value("projectID"));
         $project->select();
         $projectName = $project->get_name();
         $projectShortName = $project->get_name(array("showShortProjectLink" => true));
         $projectShortName && $projectShortName != $projectName and $projectName .= " " . $projectShortName;
     }
     $doc = new Zend_Search_Lucene_Document();
     $doc->addField(Zend_Search_Lucene_Field::Keyword('id', $this->get_id()));
     $doc->addField(Zend_Search_Lucene_Field::Text('name', $this->get_value("taskName"), "utf-8"));
     $doc->addField(Zend_Search_Lucene_Field::Text('project', $projectName, "utf-8"));
     $doc->addField(Zend_Search_Lucene_Field::Text('pid', $this->get_value("projectID"), "utf-8"));
     $doc->addField(Zend_Search_Lucene_Field::Text('creator', $creator_field, "utf-8"));
     $doc->addField(Zend_Search_Lucene_Field::Text('closer', $closer_field, "utf-8"));
     $doc->addField(Zend_Search_Lucene_Field::Text('assignee', $person_field, "utf-8"));
     $doc->addField(Zend_Search_Lucene_Field::Text('manager', $manager_field, "utf-8"));
     $doc->addField(Zend_Search_Lucene_Field::Text('modifier', $taskModifiedUser_field, "utf-8"));
     $doc->addField(Zend_Search_Lucene_Field::Text('desc', $this->get_value("taskDescription"), "utf-8"));
     $doc->addField(Zend_Search_Lucene_Field::Text('priority', $this->get_value("priority"), "utf-8"));
     $doc->addField(Zend_Search_Lucene_Field::Text('limit', $this->get_value("timeLimit"), "utf-8"));
     $doc->addField(Zend_Search_Lucene_Field::Text('best', $this->get_value("timeBest"), "utf-8"));
     $doc->addField(Zend_Search_Lucene_Field::Text('worst', $this->get_value("timeWorst"), "utf-8"));
     $doc->addField(Zend_Search_Lucene_Field::Text('expected', $this->get_value("timeExpected"), "utf-8"));
     $doc->addField(Zend_Search_Lucene_Field::Text('type', $this->get_value("taskTypeID"), "utf-8"));
     $doc->addField(Zend_Search_Lucene_Field::Text('status', $status, "utf-8"));
     $doc->addField(Zend_Search_Lucene_Field::Text('dateCreated', str_replace("-", "", $this->get_value("dateCreated")), "utf-8"));
     $doc->addField(Zend_Search_Lucene_Field::Text('dateAssigned', str_replace("-", "", $this->get_value("dateAssigned")), "utf-8"));
     $doc->addField(Zend_Search_Lucene_Field::Text('dateClosed', str_replace("-", "", $this->get_value("dateClosed")), "utf-8"));
     $doc->addField(Zend_Search_Lucene_Field::Text('dateTargetStart', str_replace("-", "", $this->get_value("dateTargetStart")), "utf-8"));
     $doc->addField(Zend_Search_Lucene_Field::Text('dateTargetCompletion', str_replace("-", "", $this->get_value("dateTargetCompletion")), "utf-8"));
     $doc->addField(Zend_Search_Lucene_Field::Text('dateStart', str_replace("-", "", $this->get_value("dateActualStart")), "utf-8"));
     $doc->addField(Zend_Search_Lucene_Field::Text('dateCompletion', str_replace("-", "", $this->get_value("dateActualCompletion")), "utf-8"));
     $index->addDocument($doc);
 }
开发者ID:cjbayliss,项目名称:alloc,代码行数:49,代码来源:task.inc.php

示例3: get_list

 public static function get_list($_FORM)
 {
     /*
      * This is the definitive method of getting a list of projects that need a sophisticated level of filtering
      *
      */
     global $TPL;
     $filter = project::get_list_filter($_FORM);
     $debug = $_FORM["debug"];
     $debug and print "<pre>_FORM: " . print_r($_FORM, 1) . "</pre>";
     $debug and print "<pre>filter: " . print_r($filter, 1) . "</pre>";
     $_FORM["return"] or $_FORM["return"] = "html";
     if ($_FORM["personID"]) {
         $from .= " LEFT JOIN projectPerson on projectPerson.projectID = project.projectID ";
     }
     if (is_array($filter) && count($filter)) {
         $filter = " WHERE " . implode(" AND ", $filter);
     }
     $q = "SELECT project.*, client.* \n            FROM project" . $from . "\n       LEFT JOIN client ON project.clientID = client.clientID \n                 " . $filter . " \n        GROUP BY project.projectID \n        ORDER BY projectName";
     // Zero is a valid limit
     if ($_FORM["limit"] || $_FORM["limit"] === 0 || $_FORM["limit"] === "0") {
         $q .= prepare(" LIMIT %d", $_FORM["limit"]);
     }
     $debug and print "Query: " . $q;
     $db = new db_alloc();
     $db->query($q);
     while ($row = $db->next_record()) {
         $print = true;
         $p = new project();
         $p->read_db_record($db);
         $row["projectName"] = $p->get_name($_FORM);
         $row["projectLink"] = $p->get_project_link($_FORM);
         $row["navLinks"] = $p->get_navigation_links();
         $label = $p->get_name($_FORM);
         $_FORM["showProjectType"] and $label .= " [" . $p->get_project_type() . "]";
         $row["label"] = $label;
         $rows[$row["projectID"]] = $row;
     }
     return (array) $rows;
 }
开发者ID:cjbayliss,项目名称:alloc,代码行数:40,代码来源:project.inc.php


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