Changeset View
Changeset View
Standalone View
Standalone View
src/applications/project/conduit/ProjectCreateConduitAPIMethod.php
Show All 37 Lines | protected function execute(ConduitAPIRequest $request) { | ||||
$user = $request->getUser(); | $user = $request->getUser(); | ||||
$this->requireApplicationCapability( | $this->requireApplicationCapability( | ||||
ProjectCreateProjectsCapability::CAPABILITY, | ProjectCreateProjectsCapability::CAPABILITY, | ||||
$user); | $user); | ||||
$project = PhabricatorProject::initializeNewProject($user); | $project = PhabricatorProject::initializeNewProject($user); | ||||
$type_name = PhabricatorProjectNameTransaction::TRANSACTIONTYPE; | $type_name = PhabricatorProjectNameTransaction::TRANSACTIONTYPE; | ||||
$members = []; | |||||
if ($request->getValue('members')) { | |||||
$members = $request->getValue('members'); | $members = $request->getValue('members'); | ||||
} | |||||
$xactions = array(); | $xactions = array(); | ||||
$xactions[] = id(new PhabricatorProjectTransaction()) | $xactions[] = id(new PhabricatorProjectTransaction()) | ||||
->setTransactionType($type_name) | ->setTransactionType($type_name) | ||||
->setNewValue($request->getValue('name')); | ->setNewValue($request->getValue('name')); | ||||
if ($request->getValue('icon')) { | if ($request->getValue('icon')) { | ||||
$xactions[] = id(new PhabricatorProjectTransaction()) | $xactions[] = id(new PhabricatorProjectTransaction()) | ||||
Show All 40 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0