本文整理汇总了PHP中PhabricatorLiskDAO::getContent方法的典型用法代码示例。如果您正苦于以下问题:PHP PhabricatorLiskDAO::getContent方法的具体用法?PHP PhabricatorLiskDAO::getContent怎么用?PHP PhabricatorLiskDAO::getContent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PhabricatorLiskDAO
的用法示例。
在下文中一共展示了PhabricatorLiskDAO::getContent方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getCustomTransactionOldValue
protected function getCustomTransactionOldValue(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
{
switch ($xaction->getTransactionType()) {
case PonderAnswerTransaction::TYPE_CONTENT:
return $object->getContent();
}
}
示例2: getCustomTransactionOldValue
protected function getCustomTransactionOldValue(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
{
switch ($xaction->getTransactionType()) {
case PonderQuestionTransaction::TYPE_TITLE:
return $object->getTitle();
case PonderQuestionTransaction::TYPE_CONTENT:
return $object->getContent();
case PonderQuestionTransaction::TYPE_ANSWERS:
return mpull($object->getAnswers(), 'getPHID');
case PonderQuestionTransaction::TYPE_STATUS:
return $object->getStatus();
}
}
示例3: validateContentVersion
private function validateContentVersion(PhabricatorLiskDAO $object, $type, PhabricatorApplicationTransaction $xaction)
{
$error = null;
if ($this->getContentVersion() && $object->getContent()->getVersion() != $this->getContentVersion()) {
$error = new PhabricatorApplicationTransactionValidationError($type, pht('Edit Conflict'), pht('Another user made changes to this document after you began ' . 'editing it. Do you want to overwrite their changes? ' . '(If you choose to overwrite their changes, you should review ' . 'the document edit history to see what you overwrote, and ' . 'then make another edit to merge the changes if necessary.)'), $xaction);
}
return $error;
}