本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}