Changeset View
Changeset View
Standalone View
Standalone View
src/applications/paste/application/PhabricatorPasteApplication.php
Show First 20 Lines • Show All 70 Lines • ▼ Show 20 Lines | return array( | ||||
'caption' => pht('Default edit policy for newly created pastes.'), | 'caption' => pht('Default edit policy for newly created pastes.'), | ||||
'template' => PhabricatorPastePastePHIDType::TYPECONST, | 'template' => PhabricatorPastePastePHIDType::TYPECONST, | ||||
'capability' => PhabricatorPolicyCapability::CAN_EDIT, | 'capability' => PhabricatorPolicyCapability::CAN_EDIT, | ||||
), | ), | ||||
); | ); | ||||
} | } | ||||
public function getQuickCreateItems(PhabricatorUser $viewer) { | public function getQuickCreateItems(PhabricatorUser $viewer) { | ||||
$items = array(); | return id(new PhabricatorPasteEditEngine()) | ||||
->setViewer($viewer) | |||||
$item = id(new PHUIListItemView()) | ->loadQuickCreateItems(); | ||||
->setName(pht('Paste')) | |||||
->setIcon('fa-clipboard') | |||||
->setHref($this->getBaseURI().'create/'); | |||||
$items[] = $item; | |||||
return $items; | |||||
} | } | ||||
public function getMailCommandObjects() { | public function getMailCommandObjects() { | ||||
return array( | return array( | ||||
'paste' => array( | 'paste' => array( | ||||
'name' => pht('Email Commands: Pastes'), | 'name' => pht('Email Commands: Pastes'), | ||||
'header' => pht('Interacting with Pastes'), | 'header' => pht('Interacting with Pastes'), | ||||
'object' => new PhabricatorPaste(), | 'object' => new PhabricatorPaste(), | ||||
'summary' => pht( | 'summary' => pht( | ||||
'This page documents the commands you can use to interact with '. | 'This page documents the commands you can use to interact with '. | ||||
'pastes.'), | 'pastes.'), | ||||
), | ), | ||||
); | ); | ||||
} | } | ||||
} | } |