public function generateTransaction(PhabricatorApplicationTransaction $template, array $spec) { $template->setTransactionType($this->getTransactionType())->setNewValue(idx($spec, 'value')); foreach ($this->getMetadata() as $key => $value) { $template->setMetadataValue($key, $value); } return $template; }
public function generateTransaction(PhabricatorApplicationTransaction $template, array $spec) { $comment = $template->getApplicationTransactionCommentObject()->setContent(idx($spec, 'value')); $template->setTransactionType($this->getTransactionType())->attachComment($comment); foreach ($this->getMetadata() as $key => $value) { $template->setMetadataValue($key, $value); } return $template; }
public function generateTransaction(PhabricatorApplicationTransaction $xaction) { if (!$this->getTransactionType()) { return null; } $xaction->setTransactionType($this->getTransactionType())->setNewValue($this->getValueForTransaction()); foreach ($this->metadata as $key => $value) { $xaction->setMetadataValue($key, $value); } return $xaction; }