/**
  * Fill in a transaction's common values, like author and content source.
  */
 protected function populateTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     $actor = $this->getActor();
     // TODO: This needs to be more sophisticated once we have meta-policies.
     $xaction->setViewPolicy(PhabricatorPolicies::POLICY_PUBLIC);
     if ($actor->isOmnipotent()) {
         $xaction->setEditPolicy(PhabricatorPolicies::POLICY_NOONE);
     } else {
         $xaction->setEditPolicy($this->getActingAsPHID());
     }
     $xaction->setAuthorPHID($this->getActingAsPHID());
     $xaction->setContentSource($this->getContentSource());
     $xaction->attachViewer($actor);
     $xaction->attachObject($object);
     if ($object->getPHID()) {
         $xaction->setObjectPHID($object->getPHID());
     }
     return $xaction;
 }
 /**
  * Fill in a transaction's common values, like author and content source.
  */
 protected function populateTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
 {
     $actor = $this->getActor();
     // TODO: This needs to be more sophisticated once we have meta-policies.
     $xaction->setViewPolicy(PhabricatorPolicies::POLICY_PUBLIC);
     if ($actor->isOmnipotent()) {
         $xaction->setEditPolicy(PhabricatorPolicies::POLICY_NOONE);
     } else {
         $xaction->setEditPolicy($this->getActingAsPHID());
     }
     // If the transaction already has an explicit author PHID, allow it to
     // stand. This is used by applications like Owners that hook into the
     // post-apply change pipeline.
     if (!$xaction->getAuthorPHID()) {
         $xaction->setAuthorPHID($this->getActingAsPHID());
     }
     $xaction->setContentSource($this->getContentSource());
     $xaction->attachViewer($actor);
     $xaction->attachObject($object);
     if ($object->getPHID()) {
         $xaction->setObjectPHID($object->getPHID());
     }
     return $xaction;
 }