Changeset View
Changeset View
Standalone View
Standalone View
src/applications/paste/controller/PhabricatorPasteEditController.php
Show First 20 Lines • Show All 182 Lines • ▼ Show 20 Lines | public function processRequest() { | ||||
$form->appendChild( | $form->appendChild( | ||||
id(new AphrontFormPolicyControl()) | id(new AphrontFormPolicyControl()) | ||||
->setUser($user) | ->setUser($user) | ||||
->setCapability(PhabricatorPolicyCapability::CAN_EDIT) | ->setCapability(PhabricatorPolicyCapability::CAN_EDIT) | ||||
->setPolicyObject($paste) | ->setPolicyObject($paste) | ||||
->setPolicies($policies) | ->setPolicies($policies) | ||||
->setName('can_edit')); | ->setName('can_edit')); | ||||
if ($v_projects) { | $form->appendControl( | ||||
$project_handles = $this->loadViewerHandles($v_projects); | |||||
} else { | |||||
$project_handles = array(); | |||||
} | |||||
$form->appendChild( | |||||
id(new AphrontFormTokenizerControl()) | id(new AphrontFormTokenizerControl()) | ||||
->setLabel(pht('Projects')) | ->setLabel(pht('Projects')) | ||||
->setName('projects') | ->setName('projects') | ||||
->setValue($project_handles) | ->setValue($v_projects) | ||||
->setDatasource(new PhabricatorProjectDatasource())); | ->setDatasource(new PhabricatorProjectDatasource())); | ||||
$form | $form | ||||
->appendChild( | ->appendChild( | ||||
id(new AphrontFormTextAreaControl()) | id(new AphrontFormTextAreaControl()) | ||||
->setLabel(pht('Text')) | ->setLabel(pht('Text')) | ||||
->setError($e_text) | ->setError($e_text) | ||||
->setValue($v_text) | ->setValue($v_text) | ||||
▲ Show 20 Lines • Show All 41 Lines • Show Last 20 Lines |