本文整理匯總了PHP中thebuggenie\core\entities\Issue::setOwner方法的典型用法代碼示例。如果您正苦於以下問題:PHP Issue::setOwner方法的具體用法?PHP Issue::setOwner怎麽用?PHP Issue::setOwner使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類thebuggenie\core\entities\Issue
的用法示例。
在下文中一共展示了Issue::setOwner方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: runDoImportCSV
//.........這裏部分代碼省略.........
}
if (isset($activerow[self::CSV_CLIENT_FAX])) {
$client->setFax($activerow[self::CSV_CLIENT_FAX]);
}
if (isset($activerow[self::CSV_CLIENT_TELEPHONE])) {
$client->setTelephone($activerow[self::CSV_CLIENT_TELEPHONE]);
}
$client->save();
} catch (\Exception $e) {
$errors[] = $this->getI18n()->__('Row %row failed: %err', array('%row' => $i + 1, '%err' => $e->getMessage()));
}
}
break;
case self::CSV_TYPE_PROJECTS:
for ($i = 0; $i != count($data); $i++) {
try {
$activerow = $data[$i];
$project = new entities\Project();
$project->setName($activerow[self::CSV_PROJECT_NAME]);
$project->save();
if (isset($activerow[self::CSV_PROJECT_PREFIX])) {
$project->setPrefix($activerow[self::CSV_PROJECT_PREFIX]);
$project->setUsePrefix(true);
}
if (isset($activerow[self::CSV_PROJECT_SCRUM])) {
if ($activerow[self::CSV_PROJECT_SCRUM] == '1') {
$project->setUsesScrum(true);
}
}
if (isset($activerow[self::CSV_PROJECT_OWNER]) && isset($activerow[self::CSV_PROJECT_OWNER_TYPE])) {
switch ($activerow[self::CSV_PROJECT_OWNER_TYPE]) {
case self::CSV_IDENTIFIER_TYPE_USER:
$user = new entities\User($activerow[self::CSV_PROJECT_OWNER]);
$project->setOwner($user);
break;
case self::CSV_IDENTIFIER_TYPE_TEAM:
$team = new entities\Team($activerow[self::CSV_PROJECT_OWNER]);
$project->setOwner($team);
break;
}
}
if (isset($activerow[self::CSV_PROJECT_LEAD]) && isset($activerow[self::CSV_PROJECT_LEAD_TYPE])) {
switch ($activerow[self::CSV_PROJECT_LEAD_TYPE]) {
case self::CSV_IDENTIFIER_TYPE_USER:
$user = new entities\User($activerow[self::CSV_PROJECT_LEAD]);
$project->setLeader($user);
break;
case self::CSV_IDENTIFIER_TYPE_TEAM:
$team = new entities\Team($activerow[self::CSV_PROJECT_LEAD]);
$project->setLeader($team);
break;
}
}
if (isset($activerow[self::CSV_PROJECT_QA]) && isset($activerow[self::CSV_PROJECT_QA_TYPE])) {
switch ($activerow[self::CSV_PROJECT_QA_TYPE]) {
case self::CSV_IDENTIFIER_TYPE_USER:
$user = new entities\User($activerow[self::CSV_PROJECT_QA]);
$project->setQaResponsible($user);
break;
case self::CSV_IDENTIFIER_TYPE_TEAM:
$team = new entities\Team($activerow[self::CSV_PROJECT_QA]);
$project->setQaResponsible($team);
break;
}
}
if (isset($activerow[self::CSV_PROJECT_DESCR])) {