本文整理汇总了PHP中PhabricatorApplicationTransaction::getRequiredHandlePHIDs方法的典型用法代码示例。如果您正苦于以下问题:PHP PhabricatorApplicationTransaction::getRequiredHandlePHIDs方法的具体用法?PHP PhabricatorApplicationTransaction::getRequiredHandlePHIDs怎么用?PHP PhabricatorApplicationTransaction::getRequiredHandlePHIDs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PhabricatorApplicationTransaction
的用法示例。
在下文中一共展示了PhabricatorApplicationTransaction::getRequiredHandlePHIDs方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getRequiredHandlePHIDs
public function getRequiredHandlePHIDs()
{
$phids = parent::getRequiredHandlePHIDs();
$type = $this->getTransactionType();
switch ($type) {
case self::TYPE_COMMIT:
$phids[] = $this->getObjectPHID();
$data = $this->getNewValue();
if ($data['authorPHID']) {
$phids[] = $data['authorPHID'];
}
if ($data['committerPHID']) {
$phids[] = $data['committerPHID'];
}
break;
case PhabricatorAuditActionConstants::ADD_CCS:
case PhabricatorAuditActionConstants::ADD_AUDITORS:
$old = $this->getOldValue();
$new = $this->getNewValue();
if (!is_array($old)) {
$old = array();
}
if (!is_array($new)) {
$new = array();
}
foreach (array_keys($old + $new) as $phid) {
$phids[] = $phid;
}
break;
}
return $phids;
}
示例2: getRequiredHandlePHIDs
public function getRequiredHandlePHIDs()
{
$phids = parent::getRequiredHandlePHIDs();
$old = $this->getOldValue();
$new = $this->getNewValue();
switch ($this->getTransactionType()) {
case self::TYPE_PUSH_POLICY:
case self::TYPE_SERVICE:
if ($old) {
$phids[] = $old;
}
if ($new) {
$phids[] = $new;
}
break;
case self::TYPE_SYMBOLS_SOURCES:
case self::TYPE_AUTOMATION_BLUEPRINTS:
if ($old) {
$phids = array_merge($phids, $old);
}
if ($new) {
$phids = array_merge($phids, $new);
}
break;
}
return $phids;
}
示例3: getRequiredHandlePHIDs
public function getRequiredHandlePHIDs()
{
$phids = parent::getRequiredHandlePHIDs();
switch ($this->getTransactionType()) {
case self::TYPE_NAME:
case self::TYPE_START_DATE:
case self::TYPE_END_DATE:
case self::TYPE_DESCRIPTION:
case self::TYPE_CANCEL:
case self::TYPE_ALL_DAY:
case self::TYPE_RECURRING:
case self::TYPE_FREQUENCY:
case self::TYPE_RECURRENCE_END_DATE:
case self::TYPE_INSTANCE_OF_EVENT:
case self::TYPE_SEQUENCE_INDEX:
$phids[] = $this->getObjectPHID();
break;
case self::TYPE_INVITE:
$new = $this->getNewValue();
foreach ($new as $phid => $status) {
$phids[] = $phid;
}
break;
}
return $phids;
}
示例4: getRequiredHandlePHIDs
public function getRequiredHandlePHIDs()
{
$phids = parent::getRequiredHandlePHIDs();
$old = $this->getOldValue();
$new = $this->getNewValue();
switch ($this->getTransactionType()) {
case self::TYPE_PRIMARY:
if ($old) {
$phids[] = $old;
}
if ($new) {
$phids[] = $new;
}
break;
case self::TYPE_OWNERS:
$add = array_diff($new, $old);
foreach ($add as $phid) {
$phids[] = $phid;
}
$rem = array_diff($old, $new);
foreach ($rem as $phid) {
$phids[] = $phid;
}
break;
}
return $phids;
}
示例5: getRequiredHandlePHIDs
public function getRequiredHandlePHIDs()
{
$phids = parent::getRequiredHandlePHIDs();
$old = $this->getOldValue();
$new = $this->getNewValue();
switch ($this->getTransactionType()) {
case self::TYPE_ACTION:
if ($new == DifferentialAction::ACTION_CLOSE && $this->getMetadataValue('isCommitClose')) {
$phids[] = $this->getMetadataValue('commitPHID');
if ($this->getMetadataValue('committerPHID')) {
$phids[] = $this->getMetadataValue('committerPHID');
}
if ($this->getMetadataValue('authorPHID')) {
$phids[] = $this->getMetadataValue('authorPHID');
}
}
break;
case self::TYPE_UPDATE:
if ($new) {
$phids[] = $new;
}
break;
}
return $phids;
}
示例6: getRequiredHandlePHIDs
public function getRequiredHandlePHIDs()
{
$phids = parent::getRequiredHandlePHIDs();
switch ($this->getTransactionType()) {
case self::TYPE_CONTENT:
$phids[] = $this->getObjectPHID();
break;
}
return $phids;
}
示例7: getRequiredHandlePHIDs
public function getRequiredHandlePHIDs()
{
$phids = parent::getRequiredHandlePHIDs();
switch ($this->getTransactionType()) {
case self::TYPE_NAME:
case self::TYPE_URL:
case self::TYPE_DESCRIPTION:
$phids[] = $this->getObjectPHID();
break;
}
return $phids;
}
示例8: getRequiredHandlePHIDs
public function getRequiredHandlePHIDs()
{
$phids = parent::getRequiredHandlePHIDs();
$old = $this->getOldValue();
$new = $this->getNewValue();
switch ($this->getTransactionType()) {
case self::TYPE_PUSH_POLICY:
$phids[] = $old;
$phids[] = $new;
break;
}
return $phids;
}
示例9: getRequiredHandlePHIDs
public function getRequiredHandlePHIDs()
{
$old = $this->getOldValue();
$new = $this->getNewValue();
$req_phids = array();
switch ($this->getTransactionType()) {
case self::TYPE_PROFILEIMAGE:
case self::TYPE_HEADERIMAGE:
$req_phids[] = $old;
$req_phids[] = $new;
break;
}
return array_merge($req_phids, parent::getRequiredHandlePHIDs());
}
示例10: getRequiredHandlePHIDs
public function getRequiredHandlePHIDs()
{
$phids = parent::getRequiredHandlePHIDs();
$old = $this->getOldValue();
$new = $this->getNewValue();
switch ($this->getTransactionType()) {
case PhabricatorMacroTransactionType::TYPE_FILE:
case PhabricatorMacroTransactionType::TYPE_AUDIO:
if ($old !== null) {
$phids[] = $old;
}
$phids[] = $new;
break;
}
return $phids;
}
示例11: getRequiredHandlePHIDs
public function getRequiredHandlePHIDs()
{
$phids = parent::getRequiredHandlePHIDs();
$phids[] = $this->getObjectPHID();
$new = $this->getNewValue();
switch ($this->getTransactionType()) {
case self::TYPE_REQUEST:
case self::TYPE_DISCOVERY:
$phids[] = $new;
break;
case self::TYPE_EDIT_FIELD:
self::searchForPHIDs($this->getOldValue(), $phids);
self::searchForPHIDs($this->getNewValue(), $phids);
break;
}
return $phids;
}
示例12: getRequiredHandlePHIDs
public function getRequiredHandlePHIDs()
{
$phids = parent::getRequiredHandlePHIDs();
$new = $this->getNewValue();
switch ($this->getTransactionType()) {
case self::TYPE_MOVE_TO:
case self::TYPE_MOVE_AWAY:
$phids[] = $new['phid'];
break;
case self::TYPE_TITLE:
if ($this->getMetadataValue('stub:create:phid')) {
$phids[] = $this->getMetadataValue('stub:create:phid');
}
break;
}
return $phids;
}
示例13: getRequiredHandlePHIDs
public function getRequiredHandlePHIDs()
{
$phids = parent::getRequiredHandlePHIDs();
switch ($this->getTransactionType()) {
case self::TYPE_BLOG:
$old = $this->getOldValue();
$new = $this->getNewValue();
if ($old) {
$phids[] = $old;
}
if ($new) {
$phids[] = $new;
}
break;
}
return $phids;
}
示例14: getRequiredHandlePHIDs
public function getRequiredHandlePHIDs()
{
$phids = parent::getRequiredHandlePHIDs();
$new = $this->getNewValue();
$old = $this->getOldValue();
switch ($this->getTransactionType()) {
case self::TYPE_OWNER:
if ($new) {
$phids[] = $new;
}
if ($old) {
$phids[] = $old;
}
break;
case self::TYPE_PROJECT_COLUMN:
$phids[] = $new['projectPHID'];
$phids[] = head($new['columnPHIDs']);
break;
case self::TYPE_MERGED_INTO:
$phids[] = $new;
break;
case self::TYPE_MERGED_FROM:
$phids = array_merge($phids, $new);
break;
case self::TYPE_EDGE:
$phids = array_mergev(array($phids, array_keys(nonempty($old, array())), array_keys(nonempty($new, array()))));
break;
case self::TYPE_ATTACH:
$old = nonempty($old, array());
$new = nonempty($new, array());
$phids = array_mergev(array($phids, array_keys(idx($new, 'FILE', array())), array_keys(idx($old, 'FILE', array()))));
break;
case self::TYPE_UNBLOCK:
foreach (array_keys($new) as $phid) {
$phids[] = $phid;
}
break;
case self::TYPE_STATUS:
$commit_phid = $this->getMetadataValue('commitPHID');
if ($commit_phid) {
$phids[] = $commit_phid;
}
break;
}
return $phids;
}
示例15: getRequiredHandlePHIDs
public function getRequiredHandlePHIDs()
{
$phids = parent::getRequiredHandlePHIDs();
$old = $this->getOldValue();
$new = $this->getNewValue();
switch ($this->getTransactionType()) {
case self::TYPE_INTERFACE:
if ($old) {
$phids[] = $old['networkPHID'];
}
if ($new) {
$phids[] = $new['networkPHID'];
}
break;
}
return $phids;
}