Changeset View
Changeset View
Standalone View
Standalone View
src/applications/transactions/edittype/PhabricatorEditType.php
| Show First 20 Lines • Show All 60 Lines • ▼ Show 20 Lines | public function setTransactionType($transaction_type) { | ||||
| $this->transactionType = $transaction_type; | $this->transactionType = $transaction_type; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function getTransactionType() { | public function getTransactionType() { | ||||
| return $this->transactionType; | return $this->transactionType; | ||||
| } | } | ||||
| abstract public function generateTransaction( | abstract public function generateTransactions( | ||||
| PhabricatorApplicationTransaction $template, | PhabricatorApplicationTransaction $template, | ||||
| array $spec); | array $spec); | ||||
| abstract public function getValueType(); | abstract public function getValueType(); | ||||
| abstract public function getValueDescription(); | abstract public function getValueDescription(); | ||||
| protected function newTransaction( | |||||
| PhabricatorApplicationTransaction $template) { | |||||
| $xaction = id(clone $template) | |||||
| ->setTransactionType($this->getTransactionType()); | |||||
| foreach ($this->getMetadata() as $key => $value) { | |||||
| $xaction->setMetadataValue($key, $value); | |||||
| } | |||||
| return $xaction; | |||||
| } | |||||
| } | } | ||||