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


PHP project::get_all_parties方法代码示例

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


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

示例1: array

 function get_all_parties($projectID = "")
 {
     $db = new db_alloc();
     $interestedPartyOptions = array();
     if ($_GET["projectID"]) {
         $projectID = $_GET["projectID"];
     } else {
         if (!$projectID) {
             $projectID = $this->get_value("projectID");
         }
     }
     if ($projectID) {
         $project = new project($projectID);
         $interestedPartyOptions = $project->get_all_parties(false, $this->get_id());
     }
     $extra_interested_parties = config::get_config_item("defaultInterestedParties") or $extra_interested_parties = array();
     foreach ($extra_interested_parties as $name => $email) {
         $interestedPartyOptions[$email]["name"] = $name;
     }
     if ($this->get_value("creatorID")) {
         $p = new person();
         $p->set_id($this->get_value("creatorID"));
         $p->select();
         if ($p->get_value("emailAddress")) {
             $interestedPartyOptions[$p->get_value("emailAddress")]["name"] = $p->get_name();
             $interestedPartyOptions[$p->get_value("emailAddress")]["role"] = "creator";
             $interestedPartyOptions[$p->get_value("emailAddress")]["personID"] = $this->get_value("creatorID");
         }
     }
     if ($this->get_value("personID")) {
         $p = new person();
         $p->set_id($this->get_value("personID"));
         $p->select();
         if ($p->get_value("emailAddress")) {
             $interestedPartyOptions[$p->get_value("emailAddress")]["name"] = $p->get_name();
             $interestedPartyOptions[$p->get_value("emailAddress")]["role"] = "assignee";
             $interestedPartyOptions[$p->get_value("emailAddress")]["personID"] = $this->get_value("personID");
             $interestedPartyOptions[$p->get_value("emailAddress")]["selected"] = 1;
         }
     }
     if ($this->get_value("managerID")) {
         $p = new person();
         $p->set_id($this->get_value("managerID"));
         $p->select();
         if ($p->get_value("emailAddress")) {
             $interestedPartyOptions[$p->get_value("emailAddress")]["name"] = $p->get_name();
             $interestedPartyOptions[$p->get_value("emailAddress")]["role"] = "manager";
             $interestedPartyOptions[$p->get_value("emailAddress")]["personID"] = $this->get_value("managerID");
             $interestedPartyOptions[$p->get_value("emailAddress")]["selected"] = 1;
         }
     }
     // return an aggregation of the current task/proj/client parties + the existing interested parties
     $interestedPartyOptions = interestedParty::get_interested_parties("task", $this->get_id(), $interestedPartyOptions);
     return $interestedPartyOptions;
 }
开发者ID:cjbayliss,项目名称:alloc,代码行数:55,代码来源:task.inc.php

示例2: array

 function get_all_parties($projectID = "")
 {
     $db = new db_alloc();
     $interestedPartyOptions = array();
     if (!$projectID && is_object($this)) {
         $projectID = $this->get_value("projectID");
     }
     if ($projectID) {
         $project = new project($projectID);
         $interestedPartyOptions = $project->get_all_parties();
     }
     $extra_interested_parties = config::get_config_item("defaultInterestedParties") or $extra_interested_parties = array();
     foreach ($extra_interested_parties as $name => $email) {
         $interestedPartyOptions[$email] = array("name" => $name);
     }
     if (is_object($this)) {
         if ($this->get_value("personID")) {
             $p = new person();
             $p->set_id($this->get_value("personID"));
             $p->select();
             $p->get_value("emailAddress") and $interestedPartyOptions[$p->get_value("emailAddress")] = array("name" => $p->get_name(), "selected" => true, "personID" => $this->get_value("personID"));
         }
         if ($this->get_value("productSaleCreatedUser")) {
             $p = new person();
             $p->set_id($this->get_value("productSaleCreatedUser"));
             $p->select();
             $p->get_value("emailAddress") and $interestedPartyOptions[$p->get_value("emailAddress")] = array("name" => $p->get_name(), "selected" => true, "personID" => $this->get_value("productSaleCreatedUser"));
         }
         $this_id = $this->get_id();
     }
     // return an aggregation of the current proj/client parties + the existing interested parties
     $interestedPartyOptions = interestedParty::get_interested_parties("productSale", $this_id, $interestedPartyOptions);
     return $interestedPartyOptions;
 }
开发者ID:cjbayliss,项目名称:alloc,代码行数:34,代码来源:productSale.inc.php

示例3: array

 function get_cc_list_select($projectID = "")
 {
     $interestedParty = array();
     $interestedPartyOptions = array();
     if (is_object($this)) {
         $interestedPartyOptions = $this->get_all_parties($projectID);
     } else {
         $project = new project($projectID);
         $interestedPartyOptions = $project->get_all_parties();
     }
     if (is_array($interestedPartyOptions)) {
         foreach ($interestedPartyOptions as $email => $info) {
             $name = $info["name"];
             $identifier = $info["identifier"];
             if ($info["role"] == "interested" && $info["selected"]) {
                 $interestedParty[] = $identifier;
             }
             if ($email) {
                 $name = trim($name);
                 $str = trim(page::htmlentities($name . " <" . $email . ">"));
                 $options[$identifier] = $str;
             }
         }
     }
     $str = "<select name=\"interestedParty[]\" multiple=\"true\">" . page::select_options($options, $interestedParty, 100, false) . "</select>";
     return $str;
 }
开发者ID:cjbayliss,项目名称:alloc,代码行数:27,代码来源:project.inc.php

示例4: array

 function get_all_parties($projectID = "")
 {
     $db = new db_alloc();
     $interestedPartyOptions = array();
     if (!$projectID && is_object($this)) {
         $projectID = $this->get_value("projectID");
     }
     if ($projectID) {
         $project = new project($projectID);
         $interestedPartyOptions = $project->get_all_parties();
     }
     $extra_interested_parties = config::get_config_item("defaultInterestedParties") or $extra_interested_parties = array();
     foreach ($extra_interested_parties as $name => $email) {
         $interestedPartyOptions[$email] = array("name" => $name);
     }
     if (is_object($this)) {
         if ($this->get_value("personID")) {
             $p = new person();
             $p->set_id($this->get_value("personID"));
             $p->select();
             $p->get_value("emailAddress") and $interestedPartyOptions[$p->get_value("emailAddress")] = array("name" => $p->get_value("firstName") . " " . $p->get_value("surname"), "role" => "assignee", "selected" => false, "personID" => $this->get_value("personID"));
         }
         if ($this->get_value("approvedByManagerPersonID")) {
             $p = new person();
             $p->set_id($this->get_value("approvedByManagerPersonID"));
             $p->select();
             $p->get_value("emailAddress") and $interestedPartyOptions[$p->get_value("emailAddress")] = array("name" => $p->get_value("firstName") . " " . $p->get_value("surname"), "role" => "manager", "selected" => true, "personID" => $this->get_value("approvedByManagerPersonID"));
         }
         $this_id = $this->get_id();
     }
     // return an aggregation of the current task/proj/client parties + the existing interested parties
     $interestedPartyOptions = interestedParty::get_interested_parties("timeSheet", $this_id, $interestedPartyOptions);
     return $interestedPartyOptions;
 }
开发者ID:cjbayliss,项目名称:alloc,代码行数:34,代码来源:timeSheet.inc.php

示例5: array

 function get_all_parties($projectID = "", $clientID = "")
 {
     $db = new db_alloc();
     $interestedPartyOptions = array();
     if (!$projectID && is_object($this)) {
         $projectID = $this->get_value("projectID");
     }
     if ($projectID) {
         $project = new project($projectID);
         $interestedPartyOptions = $project->get_all_parties();
     }
     if ($clientID) {
         $client = new client($clientID);
         $interestedPartyOptions = array_merge((array) $interestedPartyOptions, (array) $client->get_all_parties());
     }
     $extra_interested_parties = config::get_config_item("defaultInterestedParties") or $extra_interested_parties = array();
     foreach ($extra_interested_parties as $name => $email) {
         $interestedPartyOptions[$email] = array("name" => $name);
     }
     // return an aggregation of the current task/proj/client parties + the existing interested parties
     $interestedPartyOptions = interestedParty::get_interested_parties("invoice", $this->get_id(), $interestedPartyOptions);
     return $interestedPartyOptions;
 }
开发者ID:cjbayliss,项目名称:alloc,代码行数:23,代码来源:invoice.inc.php


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