コード例 #1
0
 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;
 }
コード例 #2
0
 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;
 }
コード例 #3
0
 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;
 }