本文整理汇总了PHP中PhabricatorApplicationTransactionEditor::extractFilePHIDsFromCustomTransaction方法的典型用法代码示例。如果您正苦于以下问题:PHP PhabricatorApplicationTransactionEditor::extractFilePHIDsFromCustomTransaction方法的具体用法?PHP PhabricatorApplicationTransactionEditor::extractFilePHIDsFromCustomTransaction怎么用?PHP PhabricatorApplicationTransactionEditor::extractFilePHIDsFromCustomTransaction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PhabricatorApplicationTransactionEditor
的用法示例。
在下文中一共展示了PhabricatorApplicationTransactionEditor::extractFilePHIDsFromCustomTransaction方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: extractFilePHIDsFromCustomTransaction
protected function extractFilePHIDsFromCustomTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
{
switch ($xaction->getTransactionType()) {
case PhabricatorPasteTransaction::TYPE_CONTENT:
return array($xaction->getNewValue());
}
return parent::extractFilePHIDsFromCustomTransaction($object, $xaction);
}
示例2: extractFilePHIDsFromCustomTransaction
protected function extractFilePHIDsFromCustomTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
{
switch ($xaction->getTransactionType()) {
case PhabricatorProjectTransaction::TYPE_IMAGE:
$new = $xaction->getNewValue();
if ($new) {
return array($new);
}
break;
}
return parent::extractFilePHIDsFromCustomTransaction($object, $xaction);
}
示例3: extractFilePHIDsFromCustomTransaction
protected function extractFilePHIDsFromCustomTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
{
switch ($xaction->getTransactionType()) {
}
return parent::extractFilePHIDsFromCustomTransaction($object, $xaction);
}
示例4: extractFilePHIDsFromCustomTransaction
protected function extractFilePHIDsFromCustomTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
{
switch ($xaction->getTransactionType()) {
case ConpherenceTransaction::TYPE_PICTURE:
case ConpherenceTransaction::TYPE_PICTURE_CROP:
return array($xaction->getNewValue());
}
return parent::extractFilePHIDsFromCustomTransaction($object, $xaction);
}
示例5: extractFilePHIDsFromCustomTransaction
protected function extractFilePHIDsFromCustomTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
{
$phids = parent::extractFilePHIDsFromCustomTransaction($object, $xaction);
switch ($xaction->getTransactionType()) {
case ManiphestTransaction::TYPE_COVER_IMAGE:
$phids[] = $xaction->getNewValue();
break;
}
return $phids;
}
示例6: extractFilePHIDsFromCustomTransaction
protected function extractFilePHIDsFromCustomTransaction(PhabricatorLiskDAO $object, PhabricatorApplicationTransaction $xaction)
{
$images = $this->getNewImages();
$images = mpull($images, null, 'getPHID');
switch ($xaction->getTransactionType()) {
case PholioTransaction::TYPE_IMAGE_FILE:
$file_phids = array();
foreach ($xaction->getNewValue() as $image_phid) {
$image = idx($images, $image_phid);
if (!$image) {
continue;
}
$file_phids[] = $image->getFilePHID();
}
return $file_phids;
case PholioTransaction::TYPE_IMAGE_REPLACE:
$image_phid = $xaction->getNewValue();
$image = idx($images, $image_phid);
if ($image) {
return array($image->getFilePHID());
}
break;
}
return parent::extractFilePHIDsFromCustomTransaction($object, $xaction);
}