diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index 116886402e..f924623cb0 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -3025,6 +3025,7 @@ phutil_register_library_map(array( 'PonderVoteSaveController' => 'applications/ponder/controller/PonderVoteSaveController.php', 'PonderVotingUserHasAnswerEdgeType' => 'applications/ponder/edge/PonderVotingUserHasAnswerEdgeType.php', 'PonderVotingUserHasQuestionEdgeType' => 'applications/ponder/edge/PonderVotingUserHasQuestionEdgeType.php', + 'ProjectAddProjectsEmailCommand' => 'applications/project/command/ProjectAddProjectsEmailCommand.php', 'ProjectBoardTaskCard' => 'applications/project/view/ProjectBoardTaskCard.php', 'ProjectCanLockProjectsCapability' => 'applications/project/capability/ProjectCanLockProjectsCapability.php', 'ProjectConduitAPIMethod' => 'applications/project/conduit/ProjectConduitAPIMethod.php', @@ -6517,6 +6518,7 @@ phutil_register_library_map(array( 'PonderVoteSaveController' => 'PonderController', 'PonderVotingUserHasAnswerEdgeType' => 'PhabricatorEdgeType', 'PonderVotingUserHasQuestionEdgeType' => 'PhabricatorEdgeType', + 'ProjectAddProjectsEmailCommand' => 'MetaMTAEmailTransactionCommand', 'ProjectCanLockProjectsCapability' => 'PhabricatorPolicyCapability', 'ProjectConduitAPIMethod' => 'ConduitAPIMethod', 'ProjectCreateConduitAPIMethod' => 'ProjectConduitAPIMethod', diff --git a/src/applications/project/command/ProjectAddProjectsEmailCommand.php b/src/applications/project/command/ProjectAddProjectsEmailCommand.php new file mode 100644 index 0000000000..dc69b2d208 --- /dev/null +++ b/src/applications/project/command/ProjectAddProjectsEmailCommand.php @@ -0,0 +1,70 @@ +setViewer($viewer) + ->setAllowedTypes( + array( + PhabricatorProjectProjectPHIDType::TYPECONST, + )) + ->setObjectList(implode(' ', $argv)) + ->setAllowPartialResults(true) + ->execute(); + + $xactions = array(); + + $type_project = PhabricatorProjectObjectHasProjectEdgeType::EDGECONST; + $xactions[] = $object->getApplicationTransactionTemplate() + ->setTransactionType(PhabricatorTransactions::TYPE_EDGE) + ->setMetadataValue('edge:type', $type_project) + ->setNewValue( + array( + '+' => array_fuse($project_phids), + )); + + return $xactions; + } + +}